Skip to content

Commit 15d35d7

Browse files
committed
fix %<-% usage
1 parent ebb9db3 commit 15d35d7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

R/forecaster_scaled_pop.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#' [sanitize_args_predictors_trainer]
3939
#' @importFrom epipredict epi_recipe step_population_scaling frosting arx_args_list layer_population_scaling
4040
#' @importFrom tibble tibble
41+
#' @importFrom zeallot %<-%
4142
#' @importFrom recipes all_numeric
4243
#' @export
4344
scaled_pop <- function(epi_data,
@@ -76,7 +77,7 @@ scaled_pop <- function(epi_data,
7677
# if you want to hardcode particular predictors in a particular forecaster
7778
predictors <- c(outcome, extra_sources)
7879
# TODO: Partial match quantile_level coming from here (on Dmitry's machine)
79-
c(args_list, predictors, trainer) <- sanitize_args_predictors_trainer(epi_data, outcome, predictors, trainer, args_list)
80+
c(args_list, predictors, trainer) %<-% sanitize_args_predictors_trainer(epi_data, outcome, predictors, trainer, args_list)
8081
# end of the copypasta
8182
# finally, any other pre-processing (e.g. smoothing) that isn't performed by
8283
# epipredict

tests/testthat/test-forecasters-basics.R

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ forecasters <- list(
55
c("flatline_fc", flatline_fc),
66
c("smoothed_scaled", smoothed_scaled)
77
)
8+
forecaster <- c("scaled_pop", scaled_pop)
89
for (forecaster in forecasters) {
910
test_that(paste(forecaster[[1]], "gets the date and columns right"), {
1011
jhu <- epipredict::case_death_rate_subset %>%

0 commit comments

Comments
 (0)