File tree 4 files changed +8
-39
lines changed
4 files changed +8
-39
lines changed Original file line number Diff line number Diff line change @@ -190,10 +190,10 @@ arx_class_epi_workflow <- function(
190
190
)
191
191
}
192
192
}
193
+ # regex that will match any amount of adjustment for the ahead
193
194
ahead_out_name <- glue :: glue(" ahead_[0-9]*_{pre_out_name}" )
194
195
method_adjust_latency <- args_list $ adjust_latency
195
196
if (method_adjust_latency != " none" ) {
196
- # only extend_ahead is supported atm
197
197
r <- r %> % step_adjust_latency(!! pre_out_name ,
198
198
fixed_forecast_date = forecast_date ,
199
199
method = method_adjust_latency
@@ -328,9 +328,9 @@ arx_class_args_list <- function(
328
328
if (! is.null(forecast_date ) && ! is.null(target_date )) {
329
329
if (forecast_date + ahead != target_date ) {
330
330
cli_warn(
331
- c (
332
- " `forecast_date` + `ahead` must equal `target_date`. " ,
333
- i = " {.val {forecast_date}} + {.val {ahead}} != {.val {target_date}}."
331
+ paste0 (
332
+ " `forecast_date` {.val {forecast_date}} + " ,
333
+ " `ahead` {.val {ahead}} must equal `target_date` {.val {target_date}}."
334
334
),
335
335
class = " epipredict__arx_args__inconsistent_target_ahead_forecaste_date"
336
336
)
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ arx_forecaster <- function(
61
61
62
62
63
63
preds <- forecast(wf , forecast_date = forecast_date ) %> %
64
- tibble :: as_tibble() %> %
64
+ as_tibble() %> %
65
65
select(- time_value )
66
66
67
67
structure(
@@ -140,11 +140,7 @@ arx_fcast_epi_workflow <- function(
140
140
forecast_date <- args_list $ forecast_date %|| % forecast_date_default
141
141
target_date <- args_list $ target_date %|| % (forecast_date + args_list $ ahead )
142
142
if (forecast_date + args_list $ ahead != target_date ) {
143
- cli_abort(
144
- c(
145
- " `forecast_date` + `ahead` must equal `target_date`." ,
146
- i = " {.val {forecast_date}} + {.val {ahead}} != {.val {target_date}}."
147
- ),
143
+ cli_abort(" `forecast_date` {.val {forecast_date}} + `ahead` {.val {ahead}} must equal `target_date` {.val {target_date}}." ,
148
144
class = " epipredict__arx_forecaster__inconsistent_target_ahead_forecaste_date"
149
145
)
150
146
}
@@ -314,11 +310,7 @@ arx_args_list <- function(
314
310
315
311
if (! is.null(forecast_date ) && ! is.null(target_date )) {
316
312
if (forecast_date + ahead != target_date ) {
317
- cli_abort(
318
- c(
319
- " `forecast_date` + `ahead` must equal `target_date`." ,
320
- i = " {.val {forecast_date}} + {.val {ahead}} != {.val {target_date}}."
321
- ),
313
+ cli_abort(" `forecast_date` {.val {forecast_date}} + `ahead` {.val {ahead}} must equal `target_date` {.val {target_date}}." ,
322
314
class = " epipredict__arx_args__inconsistent_target_ahead_forecaste_date"
323
315
)
324
316
}
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ epi_recipe.epi_df <-
94
94
# # Check and add roles when available
95
95
if (! is.null(roles )) {
96
96
if (length(roles ) != length(vars )) {
97
- cli_abort(paste (
97
+ cli_abort(paste0 (
98
98
" The number of roles should be the same as the number of " ,
99
99
" variables."
100
100
))
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments