Skip to content

Commit 0233cd5

Browse files
authored
Merge pull request #19 from kenmawer/km-issue_23
km-issue-23: improve printing of epi_ahead and epi_lag
2 parents da4b1ac + 1c5c1c0 commit 0233cd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/epi_shift_internal.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ bake.step_epi_shift <- function(object, new_data, ...) {
130130
print.step_epi_shift <-
131131
function(x, width = max(20, options()$width - 30), ...) {
132132
## TODO add printing of the shifts
133-
title <- ifelse(x$role == "predictor","Lagging ","Leading ") # Account for lag/lead
133+
title <- ifelse(x$role == "predictor","Lagging","Leading") %>%
134+
paste0(": ", abs(x$shift),",")
134135
recipes::print_step(x$columns, x$terms, x$trained, title, width)
135136
invisible(x)
136137
}

0 commit comments

Comments
 (0)