Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions R-packages/evalcast/R/get_covidhub_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,7 @@ get_forecast_dates <- function(forecasters,
forecast_dates <- as_date(forecast_dates)
forecaster_dates <- vector("list", length = length(forecasters))
for (i in seq_len(length(forecasters))) {
forecaster_dates[[i]] <- tryCatch({
lubridate::as_date(get_covidhub_forecast_dates(forecasters[i]))
},
error = function(e) cat(sprintf("%i. %s\n", i, e$message))
)
forecaster_dates[[i]] <- lubridate::as_date(get_covidhub_forecast_dates(forecasters[i]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly out of scope, but if you know off the top of your head, im curious: why are we using lubridate here instead of just as_date?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. (All the other as_dates should really be loading directly from lubridate since we're not importing the function.)

}
if (length(forecast_dates) != 0) {
# Intersect acts oddly with dates. If foo = as_date(bar), then foo == bar is
Expand Down