Translate 4-digit ISCO88/ISCO68 to ISCO08
isco88_to_isco08.Rd
This function translates a vector of 4-digit ISCO88/ISCO68 codes to ISCO08 codes using the translation tables stored in all_schema$isco88_to_isco08 / all_schema$isco68_to_isco08
.
Usage
isco88_to_isco08(x, label = FALSE, to_factor = FALSE)
isco68_to_isco08(x, label = FALSE, to_factor = FALSE)
Arguments
- x
A character vector of 4-digit ISCO codes.
- label
A logical value indicating whether to return the labels of the translated ISCO08 codes (default is
FALSE
).- to_factor
A logical value indicating whether to return a factor instead of a character. The order of the labels is taken from the labels for ISCO08 found in
all_labels
(default isFALSE
).
Details
This translation was taken from the iscogen
Stata package. For more details, check out the package documentation and search for ISCO88/ISCO68 -> ISCO08
.
Examples
library(dplyr)
# isco88
ess %>%
transmute(
isco88,
isco08 = isco88_to_isco08(isco88, label = FALSE),
isco08_label = isco88_to_isco08(isco88, label = TRUE)
)
#> # A tibble: 48,285 × 3
#> isco88 isco08 isco08_label
#> <chr> <chr> <chr>
#> 1 5169 5419 'Protective services workers not elsewhere classified'
#> 2 1222 1321 'Manufacturing managers'
#> 3 8120 8120 'Metal processing and finishing plant operators'
#> 4 7141 7131 'Painters and related workers'
#> 5 6111 6111 'Field crop and vegetable growers'
#> 6 6111 6111 'Field crop and vegetable growers'
#> 7 9313 9313 'Building construction labourers'
#> 8 1221 1311 'Agricultural and forestry production managers'
#> 9 1221 1311 'Agricultural and forestry production managers'
#> 10 6111 6111 'Field crop and vegetable growers'
#> # ℹ 48,275 more rows
# isco68
ess %>%
transmute(
isco68,
isco08 = isco68_to_isco08(isco68, label = FALSE),
isco08_label = isco68_to_isco08(isco68, label = TRUE)
)
#> # A tibble: 48,285 × 3
#> isco68 isco08 isco08_label
#> <chr> <chr> <chr>
#> 1 5890 5414 'Security guards'
#> 2 2120 1321 'Manufacturing managers'
#> 3 7200 8120 'Metal processing and finishing plant operators'
#> 4 9310 7131 'Painters and related workers'
#> 5 6220 9211 'Crop farm labourers'
#> 6 6220 9211 'Crop farm labourers'
#> 7 9595 9313 'Building construction labourers'
#> 8 6000 6100 'Market-oriented skilled agricultural workers'
#> 9 6000 6100 'Market-oriented skilled agricultural workers'
#> 10 6220 9211 'Crop farm labourers'
#> # ℹ 48,275 more rows