Hi I started studying Bioinformatics at my engineering school (INSA de lyon!) in september. We started learning statistics and did two classes of R hands-on, but I want to learn to use R better. (As in for my every day calculations - I'm in front of a computer anyway so why should I have to take out my TI-30?) I'm having trouble finding some of the simpler stat functions though. (despite help.search()-ing quite a bit) How can I calculate a factorial (as in 5! = 5*4*3*2*1)? How can I calculate Cnp, the number of combinations of p elements out of n elements? I found binomial() but that is the binomial law and not simply Cnp. Does anyone have a *simple* R reference sheet for R beginners who only want to do simple things? thanks in advance, yannick. ---------------------------------------------- yannick.wurm at insa-lyon.fr tel: 06.16.41.71.92 icq: 22044361 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 22 Nov 2001, Yannick Wurm wrote:> Hi > I started studying Bioinformatics at my engineering school (INSA de > lyon!) in september. We started learning statistics and did two classes > of R hands-on, but I want to learn to use R better. (As in for my every > day calculations - I'm in front of a computer anyway so why should I > have to take out my TI-30?) I'm having trouble finding some of the > simpler stat functions though. (despite help.search()-ing quite a bit) > How can I calculate a factorial (as in 5! = 5*4*3*2*1)?Use gamma. gamma(n+1) = n!> How can I calculate Cnp, the number of combinations of p elements > out of n elements? I found binomial() but that is the binomial law and > not simply Cnp.?choose> Does anyone have a *simple* R reference sheet for R beginners who > only want to do simple things?Simple is in the eye of the beholder. These seem fairly esoteric to me. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>From owner-r-help at stat.math.ethz.ch Thu Nov 22 09:29:45 2001 > How can I calculate a factorial (as in 5! = 5*4*3*2*1)?A search of past news messages at finzi.psych.upenn.edu yields two suggestions: prod(1:n) gamma(n+1) If you use it a lot you can put factorial <- function(x) {prod(1:x)} in your .Rprofile> How can I calculate Cnp, the number of combinations of p elements >out of n elements? I found binomial() but that is the binomial law and >not simply Cnp.I haven't tested the following, but it may answer your question: http://finzi.psych.upenn.edu/R/Rhelp/archive/14369.html> Does anyone have a *simple* R reference sheet for R beginners who >only want to do simple things?Yes. http://www.psych.upenn.edu/~baron/refcard.pdf and I think this is also in CRAN. It is simpler than the kinds of questions you just asked. Soon I plan to add a second page dealing mostly with graphics. Jon Baron Jon Baron -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Yannick Wurm wrote:> Hi > I started studying Bioinformatics at my engineering school (INSA de > lyon!) in september. We started learning statistics and did two classes > of R hands-on, but I want to learn to use R better. (As in for my every > day calculations - I'm in front of a computer anyway so why should I > have to take out my TI-30?) I'm having trouble finding some of the > simpler stat functions though. (despite help.search()-ing quite a bit) > How can I calculate a factorial (as in 5! = 5*4*3*2*1)? > How can I calculate Cnp, the number of combinations of p elements > out of n elements? I found binomial() but that is the binomial law and > not simply Cnp. > > Does anyone have a *simple* R reference sheet for R beginners who > only want to do simple things? > > thanks in advance, > > yannick. > ---------------------------------------------- > yannick.wurm at insa-lyon.fr > tel: 06.16.41.71.92 icq: 22044361 > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._You can find many manuals on R at http://www.R-project.org/ (manuals). There is also a simple, quick and practical manual written by Emmanuel Paradis in french. By looking for at the same page you must normally find it. Aboubakar Maitournam. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._