Skip to contents

This function translates a vector of 4-digit ISCO08/ISCO68 codes to ISCO88 codes using the translation tables stored in all_schema$isco08_to_isco88 / all_schema$isco68_to_isco88.

Usage

isco08_to_isco88(x, label = FALSE, to_factor = FALSE)

isco68_to_isco88(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 ISCO88 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 ISCO88 found in all_labels (default is FALSE).

Value

A character vector of ISCO88 codes.

Details

This translation was taken from the iscogen Stata package. For more details, check out the package documentation and search for ISCO08/ISCO68 -> ISCO88.

For more information on this class schema, please check the references below:

Examples

library(dplyr)

# isco08
ess %>% transmute(
  isco08,
  isco88 = isco08_to_isco88(isco08, label = FALSE),
  isco88_label = isco08_to_isco88(isco08, label = TRUE)
)
#> # A tibble: 48,285 × 3
#>    isco08 isco88 isco88_label                                                   
#>    <chr>  <chr>  <chr>                                                          
#>  1 5414   5169   'Protective services workers not elsewhere classified'         
#>  2 1321   1222   'Production and operations department managers in manufacturin…
#>  3 3135   8120   'Metal-processing-plant operators'                             
#>  4 7131   7141   '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 1311   1221   'Production and operations department managers in agriculture,…
#>  9 1311   1221   'Production and operations department managers in agriculture,…
#> 10 6111   6111   'Field crop and vegetable growers'                             
#> # ℹ 48,275 more rows

# isco68
ess %>% transmute(
  isco68,
  isco88 = isco68_to_isco88(isco68, label = FALSE),
  isco88_label = isco68_to_isco88(isco68, label = TRUE)
)
#> # A tibble: 48,285 × 3
#>    isco68 isco88 isco88_label                                                   
#>    <chr>  <chr>  <chr>                                                          
#>  1 5890   5169   'Protective services workers not elsewhere classified'         
#>  2 2120   1220   'Production and operations department managers'                
#>  3 7200   7220   'Blacksmiths, tool-makers and related trades workers'          
#>  4 9310   7141   'Painters and related workers'                                 
#>  5 6220   9211   'Farm-hands and labourers'                                     
#>  6 6220   9211   'Farm-hands and labourers'                                     
#>  7 9595   9313   'Building construction labourers'                              
#>  8 6000   1311   'General managers in agriculture, hunting, forestry/ and fishi…
#>  9 6000   1311   'General managers in agriculture, hunting, forestry/ and fishi…
#> 10 6220   9211   'Farm-hands and labourers'                                     
#> # ℹ 48,275 more rows