View source: R/MultiRowHierarchyCompute.R
MultiRowHierarchyComputations | R Documentation |
Showing computations behind the scenes in HierarchyCompute
MultiRowHierarchyComputations(
a,
drop0 = TRUE,
valueName = "values",
indName = "ind",
ind = NULL
)
a |
a |
drop0 |
see code |
valueName |
Parameter to Stack |
indName |
Parameter to Stack |
ind |
see code |
doStack |
Stacked output when TRUE |
Data frame where the "weights in weighted sum" is named as sign. Firs row (before stacking) contains the "results".
# Data and hierarchies used in the examples
x <- SSBtoolsData("sprt_emp") # Employment in sport in thousand persons from Eurostat database
geoHier <- SSBtoolsData("sprt_emp_geoHier")
ageHier <- SSBtoolsData("sprt_emp_ageHier")
# Create rowSelect
rowSelect = data.frame(geo = "Europe", age = c("Y15-64", "Y15-29"), year="2015")
# Create input
a <- HierarchyCompute(x, list(age = ageHier, geo = geoHier, year = "rowFactor"), "ths_per", rowSelect = rowSelect, output = "matrixComponents")
MultiRowHierarchyComputations(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.