Lists the expected values in the processed, cached FCDS data using the built-in recoding, or alternatively returns a tibble containing information about the cleaned column and value labels and the original data values.

fcds_const(var = "year_group", full = FALSE,
  fcds_recoding_file = NULL)

Arguments

var

An FCDS variable or a package constant. Set to NULL for a list of valid variables.

full

If FALSE, returns only the values that are expected in the cleaned FCDS data. If TRUE, returns information regarding the original variable name (name_original) and value (value) and the cleaned variable name (name_clean) and value label (label).

fcds_recoding_file

The path to the recoding specification yaml file. Set to NULL to use the default recoding as used in fcds_import().

Value

A character vector of valid FCDS values, or a tibble with information about the original and recoded FCDS data values.

Examples

fcds_const("race")
#> [1] "White" "Black" "Other" "Unknown"
fcds_const("race", full = TRUE)
#> # A tibble: 4 x 4 #> name_clean name_original value label #> <chr> <chr> <chr> <chr> #> 1 race Race_Recoded 1 White #> 2 race Race_Recoded 2 Black #> 3 race Race_Recoded 3 Other #> 4 race Race_Recoded 9 Unknown
fcds_const("cancer_site_group", full = TRUE) %>% head()
#> # A tibble: 6 x 4 #> name_clean name_original value label #> <chr> <chr> <chr> <chr> #> 1 cancer_site_group FCDS_Site_Group 0110 Oral Cavity and Pharynx #> 2 cancer_site_group FCDS_Site_Group 0011 Esophagus #> 3 cancer_site_group FCDS_Site_Group 0012 Stomach #> 4 cancer_site_group FCDS_Site_Group 0013 Small Intestine #> 5 cancer_site_group FCDS_Site_Group 1422 Colon excluding Rectum #> 6 cancer_site_group FCDS_Site_Group 2324 Rectum and Rectosigmoid Junction
fcds_const("moffitt_catchment")
#> [1] "Hillsborough" "Pasco" "Pinellas" "Polk" "Charlotte" #> [6] "Citrus" "DeSoto" "Hardee" "Hernando" "Highlands" #> [11] "Lake" "Lee" "Manatee" "Sarasota" "Sumter"