SingleRowHierarchyComputations: SingleRowHierarchyComputations

View source: R/SingleRowHierarchyCompute.R

SingleRowHierarchyComputationsR Documentation

SingleRowHierarchyComputations

Description

Showing computations behind the scenes in HierarchyCompute

Usage

SingleRowHierarchyComputations(
  a,
  doStack = FALSE,
  valueName = "values",
  indName = "ind"
)

Arguments

a

a

valueName

Parameter to Stack

indName

Parameter to Stack

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

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