getwilds / cancerprof

API Client for State Cancer Profiles
http://getwilds.org/cancerprof/
Other
2 stars 3 forks source link

Cancer Incidence: specifying sex causes 'invalid input error' #127

Open vsriram24 opened 2 weeks ago

vsriram24 commented 2 weeks ago

According to the documentation, we should be able to specify 'both sexes', 'male', or 'female' as our value for the sex parameter. However, output is generated only for 'both sexes'.

Example input:

allStates = cancerprof::incidence_cancer(
  area = "WA",
  areatype = "hsa",
  cancer = "all cancer sites",
  race = "All Races (includes Hispanic)",
  sex = "female",
  age = "all ages",
  stage = "all stages",
  year = "latest 5 year average"
)

Example output:

Error in handle_sex(sex) : 
  Invalid sex input, please check the documentation for valid inputs
vsriram24 commented 2 weeks ago

Just realized that this code works if sex is specified as 'females' rather than 'female'. Documentation should be corrected.