MultiRowHierarchyComputations: MultiRowHierarchyComputations

View source: R/MultiRowHierarchyCompute.R

MultiRowHierarchyComputationsR Documentation

MultiRowHierarchyComputations

Description

Showing computations behind the scenes in HierarchyCompute

Usage

MultiRowHierarchyComputations(
  a,
  drop0 = TRUE,
  valueName = "values",
  indName = "ind",
  ind = NULL
)

Arguments

a

a

drop0

see code

valueName

Parameter to Stack

indName

Parameter to Stack

ind

see code

doStack

Stacked output when TRUE

Value

Data frame where the "weights in weighted sum" is named as sign. Firs row (before stacking) contains the "results".

Examples

# 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)


statisticsnorway/Kostra documentation built on Nov. 2, 2024, 6:40 p.m.