hierarchy_code_level: A function for enriching each of the codes from it's chosen...

View source: R/economic_activity_hierachy.R

hierarchy_code_levelR Documentation

A function for enriching each of the codes from it's chosen level's code value

Description

A function for enriching each of the codes from it's chosen level's code value

Usage

hierarchy_code_level(tbl_hierarchy, level_no, col_code = "code",
  col_code_parent = "code_parent", col_layer_no = "layer_no")

Arguments

tbl_hierarchy

A data frame that should contain the entire NACE or SBI hierarchy.

level_no

The hierarchy level that you'd want to add the code of

col_code

The name of the column containing the NACE, SBI or SIC code.

col_code_parent

The name of the column that contains a NACE, SBI or SIC code that refers to the direct parent code.

col_layer_no

The name of the column that contains an integer indicating the hierarchy's level, 1 being the top level

Value

a data frame containing the original economic activity code and the new activity code

Examples

hierarchy_code_level(tbl_hierarchy, level_no = 2)

mark-me/graydon.package documentation built on Nov. 14, 2023, 5:31 p.m.