Turn character vector into factor with proper fhx
levels
make_rec_type(x)
A character vector or factor containing one or more rec_type-like
strings. This uses a controlled vocabulary, see burnr:::rec_type_all
for list of all possible rec_type values.
A factor with appropriate fhx
levels.
make_rec_type("null_year")
#> [1] null_year
#> 29 Levels: null_year recorder_year unknown_fs unknown_fi ... latelw_fi
make_rec_type(c("null_year", "late_fs"))
#> [1] null_year late_fs
#> 29 Levels: null_year recorder_year unknown_fs unknown_fi ... latelw_fi