ksic_sub: Extract Child KSIC Codes

View source: R/ksic_sub.R

ksic_subR Documentation

Extract Child KSIC Codes

Description

Extracts the child classification codes corresponding to the input KSIC codes. It can handle a vector containing codes with different numbers of digits.

Usage

ksic_sub(ksic, digit = 5, C = NULL, name = FALSE)

Arguments

ksic

character. A vector of KSIC codes to find child codes for.

digit

integer. The digit of the child classification to extract (1-5). Default is 5.

C

integer. The KSIC revision (9, 10, or 11). If NULL, getOption("ksic.C", 11) is used.

name

logical. If TRUE, returns names; if FALSE, returns codes. Default is FALSE.

Value

A list containing vectors of child codes or names for each input code. Returns a list element with NA if no child codes are found.

Examples

ksic_sub(c("26", "96", "52636"), digit = 4)

ksic_sub("58", digit = 5, name = TRUE)

KSIC documentation built on Aug. 18, 2025, 5:36 p.m.