Skip to content

Commit d8c61e6

Browse files
committed
remove unnecessary direct package refs
1 parent 5e9f659 commit d8c61e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backfill_corrections/delphiBackfillCorrection/R/preprocessing.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ get_7dav <- function(pivot_df, refd_col) {
9393
# Keep time values at the front
9494
pivot_df[, refd_col],
9595
# Compute moving average of all non-refd columns
96-
RcppRoll::roll_mean(
96+
roll_mean(
9797
as.matrix(pivot_df[, names(pivot_df)[names(pivot_df) != refd_col]]),
9898
7L, align = "right", fill = NA
9999
)
@@ -158,7 +158,7 @@ get_weekofmonth <- function(date) {
158158
month <- month(date)
159159
day <- day(date)
160160
firstdayofmonth <- as.numeric(format(make_date(year, month, 1), format="%u"))
161-
n_days <- lubridate::days_in_month(date)
161+
n_days <- days_in_month(date)
162162
n_weeks <- (n_days + firstdayofmonth - 1) %/% 7 + 1
163163
extra_check <- as.integer(n_weeks > 5)
164164
return (max((day + firstdayofmonth - 1) %/% 7 - extra_check, 0) %% 4 + 1)

backfill_corrections/delphiBackfillCorrection/R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ training_days_check <- function(issue_date, training_days) {
205205
get_populous_counties <- function() {
206206
return(
207207
covidcast::county_census %>%
208-
dplyr::select(pop = POPESTIMATE2019, fips = FIPS) %>%
208+
select(pop = POPESTIMATE2019, fips = FIPS) %>%
209209
# Drop megacounties (states)
210210
filter(!endsWith(fips, "000")) %>%
211211
arrange(desc(pop)) %>%

0 commit comments

Comments
 (0)