Skip to content
Back to formatted view

Raw Message

Message-ID: <42972499.9040704@statistik.uni-dortmund.de>
Date: 2005-05-27T13:46:01Z
From: Uwe Ligges
Subject: r: LEXICOGRAPHIC ORDERING
In-Reply-To: <42971F75.47B4677C@STATS.uct.ac.za>

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 at 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