Skip to contents

This function translates a vector of 4-digit ISCO88 codes to ISCO88COM codes using the translation table stored in all_schema$isco88_to_isco88com.

Usage

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

Value

A character vector of ISCO88COM codes.

Details

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

Examples

library(dplyr)

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