Displaying 1 result from an estimated 1 matches for "numcombin".
2007 Dec 06
0
alternatives to latex() or xtable()
...(indexnum in length(indices):1) {
# get the number of combinations of other index levels after this
one (e.g. the number of replicates we need to make of each one in this
index)
others.selector=rep(TRUE,length(indices))
others.selector[length(indices):indexnum]=FALSE
numcombinations.others = prod(unlist(subset(lapply(bynames,length),
others.selector)))
# Replicate each level of this index the number of existing
combinations of other indices
newcolumn=rep(bynames[[indexnum]],each=numcombinations.others)
if(indexnum==length(indices)) { # first run...