Re: [R] r: LEXICOGRAPHIC ORDERING

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Fri 27 May 2005 - 23:46:01 EST

Clark Allan wrote:
> HI all
>
> i have a seemingly simple question.
>
> given a sequence of numbers say, 1,2,3,4,5.
>
> i would like to get all of the possible two number arrangments
> (combinations), all 3 number arrangents ... 5 number arrangements
> (combinations).
>
> i.e.
>
> in the 2 number case:
>
> 12,13,14,15,23,24,25,34,35,45

   library(gtools)
   combinations(5, 2) %*% c(10, 1)

Uwe Ligges

>
>
> any ideas?
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> 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 Received on Fri May 27 23:52:08 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:10 EST