Skip to content

Commit 86c46a4

Browse files
committed
updating after rebase
1 parent b3c96b3 commit 86c46a4

8 files changed

+24
-52
lines changed

R/arx_classifier.R

-2
Original file line numberDiff line numberDiff line change
@@ -370,5 +370,3 @@ print.arx_class <- function(x, ...) {
370370
name <- "ARX Classifier"
371371
NextMethod(name = name, ...)
372372
}
373-
374-
# this is a trivial change to induce a check

R/utils-latency.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,11 @@ pad_to_end <- function(x, groups, end_date, columns_to_complete = NULL) {
183183
}
184184
itval <- epiprocess:::guess_period(c(x$time_value, end_date), "time_value")
185185
# get the time values we need to fill in
186-
completed_time_values <-
187-
x %>%
186+
completed_time_values <- x %>%
188187
group_by(across(all_of(groups))) %>%
189188
summarise(
190189
time_value = list2(
191-
time_value = seq_null_swap(from = max(time_value) + itval, to = end_date, by = itval)
190+
time_value = seq_forward(from = max(time_value) + itval, to = end_date, by = itval)
192191
)
193192
) %>%
194193
unnest("time_value") %>%
@@ -197,6 +196,7 @@ pad_to_end <- function(x, groups, end_date, columns_to_complete = NULL) {
197196
grouped_and_arranged <- x %>%
198197
arrange(across(all_of(c("time_value", groups)))) %>%
199198
group_by(across(all_of(groups)))
199+
200200
values_to_fill <- grouped_and_arranged %>%
201201
slice(min(across(all_of(columns_to_complete), count_single_column)):n())
202202
filled_values <- values_to_fill %>%
@@ -222,7 +222,7 @@ count_single_column <- function(col) {
222222

223223
#' seq, but returns null if from is larger
224224
#' @keywords internal
225-
seq_null_swap <- function(from, to, by) {
225+
seq_forward <- function(from, to, by) {
226226
if (from > to) {
227227
return(NULL)
228228
}

R/utils-misc.R

+11
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,14 @@ is_classification <- function(trainer) {
7575
is_regression <- function(trainer) {
7676
get_parsnip_mode(trainer) %in% c("regression", "unknown")
7777
}
78+
79+
80+
enlist <- function(...) {
81+
# converted to thin wrapper around
82+
rlang::dots_list(
83+
...,
84+
.homonyms = "error",
85+
.named = TRUE,
86+
.check_assign = TRUE
87+
)
88+
}

man/seq_null_swap.Rd renamed to man/seq_forward.Rd

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/step_adjust_latency.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-get_test_data.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
library(dplyr)
1+
suppressPackageStartupMessages(library(dplyr))
22
test_that("return expected number of rows and returned dataset is ungrouped", {
33
r <- epi_recipe(case_death_rate_subset) %>%
44
step_epi_ahead(death_rate, ahead = 7) %>%

tests/testthat/test-pad_to_end.R

-37
This file was deleted.

tests/testthat/test-step_epi_naomit.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
library(dplyr)
2-
library(parsnip)
3-
library(workflows)
1+
suppressPackageStartupMessages(library(dplyr))
2+
suppressPackageStartupMessages(library(parsnip))
3+
suppressPackageStartupMessages(library(workflows))
44

55
# Random generated dataset
66
x <- tibble(

0 commit comments

Comments
 (0)