search for: xcomb

Displaying 1 result from an estimated 1 matches for "xcomb".

Did you mean: comb
2006 Dec 13
1
combinations of m objects into r groups
...quot;,"0110","0101","0011") m<-length(r) for (k in 1:trunc(m/2)){ a <- subsets(k, m) for (i in 1:dim(a)[1]){ sub <- rep(2, m) b <- a[i,] for (j in 1:length(b)){ sub[b[j]]=1 } r <- data.frame(r, sub) } } names <- c("xcomb") for (i in 1:(dim(r)[2]-1)) { names <- c(names,paste("c",i,sep="")) } names(r) <- names Any suggestions? Thanks, Maria After searching for help I found a