Re: [R] Permutations of variables in a dataframe

2008-01-14 Thread Henrique Dallazuanna
Is this you want? apply(apply(perms, 1, as.logical), 2, function(x)df[x]) On 14/01/2008, Serguei Kaniovski <[EMAIL PROTECTED]> wrote: > Henrique, I know I have to use "apply", but how do I select the columns of > the dataframe using the permutation vectors produced by > > nvar <- ncol(dat) - 1

Re: [R] Permutations of variables in a dataframe

2008-01-14 Thread Henrique Dallazuanna
If I understand your question use apply ?apply On 14/01/2008, Serguei Kaniovski <[EMAIL PROTECTED]> wrote: > Hallo All, > > I would like to apply a function to all permutations of variables in a > dataframe (except the first). What is the best way to achieve this? > > I produce the permutations u