Regardless of the area selected (United States or an individual state), selecting 'county' as the area type will always generate an error.
Example code:
cancerprof::incidence_cancer(
area = "United States",
areatype = "county",
cancer = "all cancer sites",
race = "All Races (includes Hispanic)",
sex = "both sexes",
age = "all ages",
stage = "all stages",
year = "latest 5 year average"
)
Example output:
Error in 'mutate()':
! Can't transform a data frame with 'NA' or '""' names.
Backtrace:
1. cancerprof::incidence_cancer(...)
4. dplyr:::mutate.data.frame(...)
This is definitely a bug in the {cancerprof} package and not the State Cancer Profiles API because entering the above parameters in the State Cancer Profiles website will generate a corresponding map.
Regardless of the area selected (United States or an individual state), selecting 'county' as the area type will always generate an error.
Example code:
Example output: