Skip to content

Commit

Permalink
Update R/create.R
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Funk <[email protected]>
  • Loading branch information
seabbs and sbfnk authored Jan 8, 2024
1 parent cae3465 commit 7f34846
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/create.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ create_clean_reported_cases <- function(reported_cases, horizon,
date >= min(date[confirm[!is.na(confirm)] > 0])
]
}
# Calculate the 7-day moving average.
# Calculate `average_7_day` which for rows with `confirm == 0`
# (the only instance where this is being used) equates to the 7-day
# right-aligned moving average at the previous data point.
reported_cases <-
reported_cases[
,
Expand Down

0 comments on commit 7f34846

Please sign in to comment.