Re: [R] How I calculate nCr with R ? (Como calculo nCr con R? )
At 10:37 19/03/05, Mario Morales wrote: En español (In Spanish) Necesito calcular la en numeros de combinaciones de n cosas tomando k al tiempo. In English we usually read this as N choose r and with that clue you might go ?choose Incidentally your English is fine although I see the logic in giving us both. Como hago eso en R ??? Yo escribí mi propia función pero pienso que de esa forma no es fácil para mis estudiantes . He estado buscando en la ayuda y no he encontrado información sobre una función que calcule eso directamente. Podrían ayudarme In English (en Inglés ) I need calculate the combination of n things taking k at time. How do I do that in R ? I wrote my own function but in this form isn't easy for my students. Can you help me ? Michael Dewey [EMAIL PROTECTED] http://www.aghmed.fsnet.co.uk/home.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] How I calculate nCr with R ? (Como calculo nCr con R? )
Try choose(k,r) > choose(10,2) [1] 45 JB > -Original Message- > From: Mario Morales [mailto:[EMAIL PROTECTED] > Sent: March 19, 2005 5:37 AM > To: r-help@stat.math.ethz.ch > Subject: [R] How I calculate nCr with R ? (Como calculo nCr con R? ) > > En español (In Spanish) > > Necesito calcular la en numeros de combinaciones de n cosas > tomando k al tiempo. > > Como hago eso en R ??? > > Yo escribí mi propia función pero pienso que de esa forma no es > fácil para mis estudiantes . > > He estado buscando en la ayuda y no he encontrado información > sobre una función que calcule eso directamente. Podrían ayudarme > > > In English (en Inglés ) > > I need calculate the combination of n things taking k at time. > > > How do I do that in R ? > > I wrote my own function but in this form isn't easy for my > students. > > Can you help me ? > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] How I calculate nCr with R ? (Como calculo nCr con R? )
do you mean n choose k which is a built in function see ?choose On Sat, 19 Mar 2005, Mario Morales wrote: > En español (In Spanish) > > Necesito calcular la en numeros de combinaciones de n cosas > tomando k al tiempo. > > Como hago eso en R ??? > > Yo escribí mi propia función pero pienso que de esa forma no es > fácil para mis estudiantes . > > He estado buscando en la ayuda y no he encontrado información > sobre una función que calcule eso directamente. Podrían ayudarme > > > In English (en Inglés ) > > I need calculate the combination of n things taking k at time. > > > How do I do that in R ? > > I wrote my own function but in this form isn't easy for my > students. > > Can you help me ? > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] How I calculate nCr with R ? (Como calculo nCr con R? )
Mario Morales wrote: En español (In Spanish) Necesito calcular la en numeros de combinaciones de n cosas tomando k al tiempo. Como hago eso en R ??? Yo escribí mi propia función pero pienso que de esa forma no es fácil para mis estudiantes . He estado buscando en la ayuda y no he encontrado información sobre una función que calcule eso directamente. Podrían ayudarme In English (en Inglés ) I need calculate the combination of n things taking k at time. Just the number of combinations: ?choose For listing all of them (you could have found those packages yourself, BTW), e.g: - combinations() in package "gtools" in bundle "gregmisc" - combn() in package "combinat" Uwe Ligges How do I do that in R ? I wrote my own function but in this form isn't easy for my students. Can you help me ? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html