Skip to content

Commit 1ada3d0

Browse files
committed
minor rebase woes
1 parent a6b0d3f commit 1ada3d0

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

NAMESPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,13 @@ importFrom(hardhat,run_mold)
241241
importFrom(magrittr,"%>%")
242242
importFrom(quantreg,rq)
243243
importFrom(recipes,bake)
244+
importFrom(recipes,detect_step)
244245
importFrom(recipes,prep)
245246
importFrom(rlang,"!!")
246247
importFrom(rlang,"%@%")
247248
importFrom(rlang,"%||%")
248249
importFrom(rlang,":=")
250+
importFrom(rlang,as_function)
249251
importFrom(rlang,caller_env)
250252
importFrom(rlang,global_env)
251253
importFrom(rlang,is_null)
@@ -261,8 +263,6 @@ importFrom(stats,predict)
261263
importFrom(stats,qnorm)
262264
importFrom(stats,quantile)
263265
importFrom(stats,residuals)
264-
importFrom(tibble,as_tibble)
265-
importFrom(tibble,is_tibble)
266266
importFrom(tibble,tibble)
267267
importFrom(tidyr,drop_na)
268268
importFrom(tidyr,unnest)

R/step_adjust_latency.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ step_adjust_latency_new <-
182182
# lags introduces max(lags) NA's after the max_time_value.
183183
#' @export
184184
prep.step_adjust_latency <- function(x, training, info = NULL, ...) {
185-
186185
# get the columns used, even if it's all of them
187186
terms_used <- x$columns
188187
if (length(terms_used) == 0) {

tests/testthat/test-step_adjust_latency.R

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,20 @@ test_that("epi_adjust_latency insist there's steps before it", {
141141
)
142142
expect_error(
143143
r5 <- epi_recipe(x) %>%
144-
step_epi_lag(death_rate, lag = c(0, 6, 11)) %>%
144+
step_epi_lag(death_rate, lag = c(0, 6, 11)) %>%
145145
step_adjust_latency(method = "extend_ahead"),
146146
regexp = "extend_ahead"
147147
)
148148
})
149149

150150
test_that("epi_adjust_latency warns against removing NA's beforehand", {
151-
expect_error(r5 <- epi_recipe(x) %>%
152-
step_epi_lag(death_rate, lag = c(0, 6, 11)) %>%
153-
step_epi_lag(case_rate, lag = c(1, 5)) %>%
154-
step_epi_naomit() %>%
155-
step_adjust_latency(method = "extend_lags"),
156-
regexp = "adjust_latency needs to occur before any `NA` removal")
151+
expect_error(
152+
r5 <- epi_recipe(x) %>%
153+
step_epi_lag(death_rate, lag = c(0, 6, 11)) %>%
154+
step_epi_lag(case_rate, lag = c(1, 5)) %>%
155+
step_epi_naomit() %>%
156+
step_adjust_latency(method = "extend_lags"),
157+
regexp = "adjust_latency needs to occur before any `NA` removal"
158+
)
157159
})
158160
# todo check that epi_adjust_latency errors for nonsense `as_of`'s

0 commit comments

Comments
 (0)