powered by
According to the (factor) levels of the variables
HierarchicalGroups( x = NULL, mainName = TRUE, eachName = FALSE, fCorr = FactorLevCorr(x) )
Matrix or data frame containing the variables
When TRUE output list is named according to first variable in group.
When TRUE variable names in output instead of indices.
When non-null x is not needed as input.
Output is a list containing the groups. First variable has most levels.
# NOT RUN { x <- rep(c("A","B","C"),3) y <- rep(c(11,22,11),3) z <- c(1,1,1,2,2,2,3,3,3) zy <- paste(z,y,sep="") m <- cbind(x,y,z,zy) HierarchicalGroups(m) # }
Run the code above in your browser using DataLab