Re: [R] permutations in R

2009-03-19 Thread Greg Snow
alf Of > Stavros Macrakis > Sent: Tuesday, March 17, 2009 10:46 PM > To: Greg Snow > Cc: onyourmark; r-help@r-project.org > Subject: Re: [R] permutations in R > > On Tue, Mar 17, 2009 at 12:41 PM, Greg Snow > wrote: > > No, I meant the Combinations package, it is ap

Re: [R] permutations in R

2009-03-18 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > On Tue, Mar 17, 2009 at 5:24 AM, Gavin Simpson > wrote: > >> On Mon, 2009-03-16 at 18:43 -0400, Stavros Macrakis wrote: >> >>> ... no way to find relevant functions, and no way of knowing which one to >>> use if there is more than one. >>> > > >> That

Re: [R] permutations in R

2009-03-17 Thread Stavros Macrakis
On Tue, Mar 17, 2009 at 12:41 PM, Greg Snow wrote: > No, I meant the Combinations package, it is apparently an Omegahat package > (http://www.omegahat.org/Combinations/).  It looks similar to the permn > function as far as the usage goes, but the documentation includes additional > information

Re: [R] permutations in R

2009-03-17 Thread Stavros Macrakis
On Tue, Mar 17, 2009 at 5:24 AM, Gavin Simpson wrote: > On Mon, 2009-03-16 at 18:43 -0400, Stavros Macrakis wrote: >> ... no way to find relevant functions, and no way of knowing which one to >> use if there is more than one. > That is what the Task Views are meant to address, for discrete subje

Re: [R] permutations in R

2009-03-17 Thread Greg Snow
ject.org > Subject: Re: [R] permutations in R > > Greg, > > Thanks for helping this user. > > I assume you mean the permn function in the combinat package? For a > new user (including me), it is not obvious how to get from "the > permutations function in the Combina

Re: [R] permutations in R

2009-03-17 Thread Gavin Simpson
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > >> project.org] On Behalf Of onyourmark > >> Sent: Friday, March 13, 2009 7:09 PM > >> To: r-help@r-project.org > >> Subject: [R] permutations in R > >> > >> > >>

Re: [R] permutations in R

2009-03-16 Thread David Winsemius
ct.org] On Behalf Of onyourmark Sent: Friday, March 13, 2009 7:09 PM To: r-help@r-project.org Subject: [R] permutations in R Hi. Does anyone know of a function which will take as input a number n (or a set of n letters) and will give out, one at a time, the permutations of n (or of those n l

Re: [R] permutations in R

2009-03-16 Thread Stavros Macrakis
n Healthcare > greg.s...@imail.org > 801.408.8111 > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- >> project.org] On Behalf Of onyourmark >> Sent: Friday, March 13, 2009 7:09 PM >> To: r-help@r-project.org >>

Re: [R] permutations in R

2009-03-16 Thread Greg Snow
ermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of onyourmark > Sent: Friday, March 13, 2009 7:09 PM > To: r-help@r-project.org > Subject: [R] permutations

Re: [R] permutations in R

2009-03-13 Thread Daniel Viar
Try this: > # Taken from combinations(gtools) > # library(gregmisc) > # Function permutations > fn_perm_list <- + function (n, r, v = 1:n) + { +if (r == 1) + matrix(v, n, 1) +else if (n == 1) + matrix(v, 1, r) +else { + X <- NULL + for (i in 1:n) X <- rbind(X, c

[R] permutations in R

2009-03-13 Thread onyourmark
Hi. Does anyone know of a function which will take as input a number n (or a set of n letters) and will give out, one at a time, the permutations of n (or of those n letters) as a vector? So that I can use the permutations one at a time. And such that it will exhaust all the permutations with no r