Learn R Programming

SSBtools (version 0.8.0)

Hierarchy2Formula: Hierarchy2Formula

Description

Conversion between to-from coded hierarchy and formulas written with =, - and +.

Usage

Hierarchy2Formula(
  x,
  hierarchyVarNames = c(mapsFrom = "mapsFrom", mapsTo = "mapsTo", sign = "sign", level
    = "level")
)

Formula2Hierarchy(s)

Arguments

x

Data frame with to-from coded hierarchy

hierarchyVarNames

Variable names in the hierarchy tables as in HierarchyFix.

s

Character vector of formulas written with =, - and +.

Value

See Arguments

Examples

Run this code
# NOT RUN {
x <- SSBtoolsData("sprt_emp_geoHier")
s <- Hierarchy2Formula(x)
Formula2Hierarchy(s)

# }

Run the code above in your browser using DataLab