powered by
Finding lists of level-hierarchy as needed for the input parameter dimList to the function makeProblem in package sdcTable
FindDimLists( x, groupVarInd = HierarchicalGroups(x = x), addName = FALSE, sep = ".", xReturn = FALSE, total = "Total" )
Matrix or data frame containing the variables (micro data or cell counts data).
List of vectors of indices defining the hierarchical variable groups.
When TRUE the variable name is added to the level names, except for variables with most levels.
A character string to separate when addName apply.
When TRUE x is also in output, possibly changed according to addName.
String used to name totals.
Output is a list according to the specifications in sdcTable. When xReturn is TRUE output has an extra list level and x is the first element.
# 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) FindDimLists(m) # }
Run the code above in your browser using DataLab