Skip to content

error in using the years argument to get_cdc_hosp #232

@vpnagraj

Description

@vpnagraj

the data retrieval from the get_cdc_hosp() function is failing when the "years" argument is used:

library(fiphde)

get_cdc_hosp(years = 2019)
#> 
#> Error in `dplyr::filter()` at fiphde/R/retrieve.R:736:5:
#> ℹ In argument: `season %in% years`.
#> Caused by error:
#> ! object 'season' not found
get_cdc_hosp(years = "2019")
#> 
#> Error in `dplyr::filter()` at fiphde/R/retrieve.R:736:5:
#> ℹ In argument: `season %in% years`.
#> Caused by error:
#> ! object 'season' not found
get_cdc_hosp(years = "2019-20")
#> Warning in hospitalizations(surveillance_area = "flusurv", region = "all", :
#> NAs introduced by coercion
#> 
#> Error in `dplyr::filter()` at fiphde/R/retrieve.R:736:5:
#> ℹ In argument: `season %in% years`.
#> Caused by error:
#> ! object 'season' not found
get_cdc_hosp(years = "2019-2020")
#> Warning in hospitalizations(surveillance_area = "flusurv", region = "all", :
#> NAs introduced by coercion
#> 
#> Error in `dplyr::filter()` at fiphde/R/retrieve.R:736:5:
#> ℹ In argument: `season %in% years`.
#> Caused by error:
#> ! object 'season' not found

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions