Title: Korea Standard Industrial Classification (KSIC)
Version: 1.0.2
Description: Provides tools for working with the Korea Standard Industrial Classification (KSIC). Includes datasets for the 9th, 10th, and 11th revisions. Functions include searching codes and names by keyword, converting codes across revisions, validating KSIC codes, and navigating the classification hierarchy (e.g., identifying parent or child categories). Intended for use in statistical analysis, data processing, and research involving South Korea’s industrial classification system.
Encoding: UTF-8
RoxygenNote: 7.3.2
URL: https://github.com/urbanjj/KSIC
BugReports: https://github.com/urbanjj/KSIC/issues
Depends: R (≥ 3.5.0)
LazyData: true
License: GPL (≥ 3)
Suggests: knitr, rmarkdown, tibble, tidyr
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-07-30 05:17:51 UTC; SI
Author: Jongjin Yun ORCID iD [aut, cre]
Maintainer: Jongjin Yun <jongjin@uos.ac.kr>
Repository: CRAN
Date/Publication: 2025-08-18 14:00:07 UTC

KSIC: Korea Standard Industrial Classification (KSIC)

Description

Provides tools for working with the Korea Standard Industrial Classification (KSIC). Includes datasets for the 9th, 10th, and 11th revisions. Functions include searching codes and names by keyword, converting codes across revisions, validating KSIC codes, and navigating the classification hierarchy (e.g., identifying parent or child categories). Intended for use in statistical analysis, data processing, and research involving South Korea’s industrial classification system.

Author(s)

Maintainer: Jongjin Yun jongjin@uos.ac.kr (ORCID)

See Also

Useful links:


Check for Valid KSIC Codes

Description

Checks if the input codes are valid for the given KSIC revision (9th, 10th, or 11th).

Usage

is_ksic(ksic)

Arguments

ksic

character. A vector of KSIC codes to check.

Value

A data.frame with the input codes and logical columns (C9, C10, C11) indicating validity.


Get KSIC Data

Description

Returns a data.frame of KSIC data for the specified revision and digit.

Usage

ksic(digit = 5, C = NULL, eng_nm = FALSE)

Arguments

digit

integer. The digit of the 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.

eng_nm

logical. If TRUE, includes English classification names; if FALSE, excludes them. Default is FALSE.

Value

A data.frame containing the specified KSIC codes and names.

Examples

ksic(digit = 1)

ksic(digit = 2, C = 10, eng_nm = TRUE)

Korea Standard Industry Code Data

Description

A dataset containing the codes, names, revisions, and digits of the 9th and 10th Korea Standard Industrial Classification (KSIC).

Usage

ksicDB

Format

A data frame with columns:

cd

Classification code.

nm

Classification name.

eng_nm

English classification name.

digit

Digit of the classification (1-5).

ksic_C

KSIC revision (C9 or C10).

Examples

  ksicDB

Korea Standard Industry Code Tree Data

Description

A dataset representing the hierarchical structure of the 9th and 10th KSIC. It includes parent codes for each 5-digit classification.

Usage

ksicTreeDB

Format

A data frame with columns for each classification level (1 to 5 digits) and the KSIC revision.

Examples

  ksicTreeDB

KSIC 10th to 11th Concordance Table

Description

A concordance table for converting 10th revision KSIC codes to 11th revision KSIC codes.

Usage

ksic_10_to_11

Format

A data frame with 5 columns:

ksic10_cd

10th revision KSIC code.

ksic10_nm

10th revision KSIC name.

ksic11_cd

11th revision KSIC code.

ksic11_nm

11th revision KSIC name.

detail

Additional details about the connection.

Examples

  ksic_10_to_11

KSIC 10th to 9th Concordance Table

Description

A concordance table for converting 10th revision KSIC codes to 9th revision KSIC codes.

Usage

ksic_10_to_9

Format

A data frame with 6 columns:

ksic10_cd

10th revision KSIC code.

ksic10_nm

10th revision KSIC name.

ksic9_cd

9th revision KSIC code.

ksic9_nm

9th revision KSIC name.

con

Type of connection.

detail

Additional details about the connection.

Examples

  ksic_10_to_9

KSIC 11th to 10th Concordance Table

Description

A concordance table for converting 11th revision KSIC codes to 10th revision KSIC codes.

Usage

ksic_11_to_10

Format

A data frame with columns for 11th codes, 10th codes, and connection details.

ksic11_cd

11th revision KSIC code.

ksic11_nm

11th revision KSIC name.

ksic10_cd

10th revision KSIC code.

ksic10_nm

10th revision KSIC name.

detail

Additional details about the connection.

Examples

  ksic_11_to_10

KSIC 9th to 10th Concordance Table

Description

A concordance table for converting 9th revision KSIC codes to 10th revision KSIC codes.

Usage

ksic_9_to_10

Format

A data frame with 6 columns:

ksic9_cd

9th revision KSIC code.

ksic9_nm

9th revision KSIC name.

ksic10_cd

10th revision KSIC code.

ksic10_nm

10th revision KSIC name.

con

Type of connection.

detail

Additional details about the connection.

Examples

  ksic_9_to_10

Convert KSIC Codes

Description

Converts KSIC codes from one revision to another.

Usage

ksic_convert(ksic, from_C, to_C)

Arguments

ksic

character. A vector of 5-digit KSIC codes to convert (e.g., '10111').

from_C

integer. The source KSIC revision (9, 10, or 11).

to_C

integer. The target KSIC revision (9, 10, or 11).

Value

data.frame. A data.frame containing converted KSIC codes and related information. Only convertible codes from the input will be included.

Examples

ksic_convert(c("27192", "27195"), from_C = 10, to_C = 11)

ksic_convert(c("27192", "27195"), from_C = 11, to_C = 10)

Find KSIC Information by Code

Description

Searches for KS.IC information by code.

Usage

ksic_find(codes)

Arguments

codes

character. A vector of KSIC codes.

Value

A data.frame of matching KSIC codes and names.


Extract Parent KSIC Codes

Description

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

Usage

ksic_group(ksic, digit = 1, C = NULL, name = FALSE)

Arguments

ksic

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

digit

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

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 character vector of the same length as the input vector, containing parent codes or names. Returns NA if a parent code does not exist.

Examples

ksic_group(c("31311", "4631", "25", "A"), digit = 2, name = TRUE)

ksic_group("26222", digit = 4)

Description

Searches for KSIC codes by a keyword in Korean or English classification names. If searching with a Korean keyword, the English name (eng_nm) column is excluded from the result.

Usage

ksic_search(keyword, C = NULL, ignore.case = TRUE, digit = NULL)

Arguments

keyword

character. keyword to search for.

C

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

ignore.case

logical. If TRUE, the case is ignored during search. Default is TRUE.

digit

integer. Can be a vector of (1-5). If NULL, all digits are searched.

Value

A data.frame of matching KSIC codes and names, or NULL if no match is found.

Examples


ksic_search("software", C = 10, ignore.case = FALSE, digit = 5)

ksic_search("data|database")

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)