View source: R/SingleRowHierarchyCompute.R
SingleRowHierarchyComputations | R Documentation |
Showing computations behind the scenes in HierarchyCompute
SingleRowHierarchyComputations(
a,
doStack = FALSE,
valueName = "values",
indName = "ind"
)
a |
a |
valueName |
Parameter to Stack |
indName |
Parameter to Stack |
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 since a single row only
rowSelect <- data.frame(age = "Y15-64", geo = "Europe", stringsAsFactors = FALSE)
# Create input
a <- HierarchyCompute(x, list(age = ageHier, geo = geoHier, year = "colFactor"), "ths_per", rowSelect = rowSelect, output = "matrixComponents")
SingleRowHierarchyComputations(a)
SingleRowHierarchyComputations(a, TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.