# NOT RUN {
## HS combined to NAICS
# one input: one-to-one match
concord_hs_naics(sourcevar = "120600",
origin = "HS", destination = "NAICS",
all = FALSE)
concord_hs_naics(sourcevar = "120600",
origin = "HS", destination = "NAICS",
all = TRUE)
# two inputs: multiple-to-one match
concord_hs_naics(sourcevar = c("120600", "120400"),
origin = "HS", destination = "NAICS",
all = FALSE)
concord_hs_naics(sourcevar = c("120600", "120400"),
origin = "HS", destination = "NAICS",
all = TRUE)
# two inputs: repeated
concord_hs_naics(sourcevar = c("120600", "120600"),
origin = "HS", destination = "NAICS",
all = FALSE)
# one to multiple matches
concord_hs_naics(sourcevar = c("120600", "854690"),
origin = "HS", destination = "NAICS",
all = TRUE)
# if no match, will return NA and give warning message
concord_hs_naics(sourcevar = c("120600", "120800"),
origin = "HS", destination = "NAICS",
all = FALSE)
# 4-digit inputs
concord_hs_naics(sourcevar = c("1206", "8546"),
origin = "HS", destination = "NAICS",
all = TRUE)
# 4-digit outputs
concord_hs_naics(sourcevar = c("120600", "854690"),
origin = "HS", destination = "NAICS",
dest.digit = 4, all = TRUE)
## HS5 to NAICS
concord_hs_naics(sourcevar = c("1206", "8546"),
origin = "HS5", destination = "NAICS",
all = TRUE)
concord_hs_naics(sourcevar = c("120600", "854690"),
origin = "HS5", destination = "NAICS",
dest.digit = 4, all = TRUE)
## NAICS to HS
concord_hs_naics(sourcevar = c("1111", "3271"),
origin = "NAICS", destination = "HS",
all = TRUE)
concord_hs_naics(sourcevar = c("111120", "326199"),
origin = "NAICS", destination = "HS",
dest.digit = 4, all = TRUE)
# }
Run the code above in your browser using DataLab