View source: R/FindHierarchies.R
FindHierarchies | R Documentation |
FindDimLists
and AutoHierarchies
wrapped into a single function.
FindHierarchies(data, total = "Total")
data |
Matrix or data frame containing the variables (micro data or cell counts data). |
total |
String used to name totals. A vector of length |
List of hierarchies
Øyvind Langsrud
dataset <- SSBtoolsData("example1")
FindHierarchies(dataset[1:2])
FindHierarchies(dataset[2:3])
FindHierarchies(dataset[1:4])
FindHierarchies(SSBtoolsData("magnitude1")[1:4],
total = c("TOTAL", "unused1", "Europe", "unused2"))
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)
FindHierarchies(m)
FindHierarchies(m, total = paste0("A", 1:4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.