Skip to content

Commit

Permalink
Merge pull request #397 from reichlab/update_align
Browse files Browse the repository at this point in the history
wrap condition checks of length > 1 in all, for R 4.3.0
  • Loading branch information
elray1 authored May 22, 2023
2 parents ccabcf6 + d4bd33e commit 9655b83
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: covidHubUtils
Title: Utility functions for the COVID-19 forecast hub
Version: 0.1.7
Version: 0.1.8
Authors@R: c(
person(given = "Yijin Serena",
family = "Wang",
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
## Changes since last release
- None yet

## covidHubUtils 0.1.8

This update has minor changes.
### Updates
- Update `download_raw_nytimes()` to load county level data from separate files for each year on nytimes github repository.
- Remove `"USAFacts"` as `truth_source` from `load_truth()`, `plot_forecasts()` and vignettes.
- Update `load_truth()` to work with files stored with Git LFS in the US forecast hub.
- Performance improvements in `load_forecasts_repo()`
- Bug fix in use of `&&` in `align_forecasts`, only relevant for R version 4.3.0 and higher.

## covidHubUtils 0.1.7

Expand Down
6 changes: 3 additions & 3 deletions R/align.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ align_forecasts <- function(
drop_nonpos_relative_horizons = TRUE
) {
if (!(
c("wk", "day") %in% (names(reference_dates)) &&
c("wk", "day") %in% (names(reference_weekday)) &&
c("wk", "day") %in% (names(reference_windows))
all(c("wk", "day") %in% (names(reference_dates))) &&
all(c("wk", "day") %in% (names(reference_weekday))) &&
all(c("wk", "day") %in% (names(reference_windows)))
)) {
stop(paste0("reference_dates, reference_weekday, and reference_windows ",
"must be named lists with entries for 'wk' and 'day'."))
Expand Down

0 comments on commit 9655b83

Please sign in to comment.