Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as_of can't handle Date-type input #194

Closed
dshemetov opened this issue Oct 6, 2023 · 3 comments
Closed

as_of can't handle Date-type input #194

dshemetov opened this issue Oct 6, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@dshemetov
Copy link
Contributor

r$> forecast_due_date = as.Date("2021-10-19")

r$> epidatr::pub_covidcast(
          "hhs",
          "confirmed_admissions_influenza_1d",
          "state",
          "day",
          "*",
          epirange(forecast_due_date - 20L, forecast_due_date),
          as_of = forecast_due_date
        )
Error in charToDate(x) : 
  character string is not in a standard unambiguous format

r$> epidatr::pub_covidcast(
          "hhs",
          "confirmed_admissions_influenza_1d",
          "state",
          "day",
          "*",
          epirange(forecast_due_date - 20L, forecast_due_date),
          as_of = "2021-10-19"
        )
# A tibble: 1,080 × 15
...
@dsweber2
Copy link
Contributor

dsweber2 commented Oct 6, 2023

pretty sure this is a dupe of #192, he mentions length 1 vectors as well

@dshemetov
Copy link
Contributor Author

Seems right, but let's keep this open so we make sure we address the example above with whatever fix we implement

@dsweber2 dsweber2 added this to the Z: epidatr 1.2 release milestone Oct 21, 2023
@nmdefries nmdefries self-assigned this Nov 27, 2023
@nmdefries nmdefries added the bug Something isn't working label Nov 29, 2023
@nmdefries
Copy link
Contributor

Closed by #224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants