[R] Re : calling combinations of variable names

2009-09-08 Thread justin bem
may be this can work testfun-function(x) { rval= k-length(x) for (i in 1: k) rval-paste(rval,x[i],sep=-) rval } v1-paste(evalr,1:4,sep=) eval-expand.grid(w=v1,x=v1,y=v1,z=v1) n-dim(eval)[1] results-rep(, n) for (i in 1:n) { row-unique(unlist(eval[i,])) if (length(row)=3)

Re: [R] Re : calling combinations of variable names

2009-09-08 Thread Helter Two
AM To: helter...@care2.com Cc: r-h...@stat.math.ethz.ch Subject: Re: Re : [R] calling combinations of variable names may be this can work testfun-function(x) { rval= k-length(x) for (i in 1: k) rval-paste(rval,x[i],sep=-) rval } v1-paste(evalr,1:4,sep=) eval-expand.grid(w=v1,x=v1,y=v1,z=v1) n