Skip to content

Commit 823ded1

Browse files
committed
glue -> glue::glue
1 parent edca39e commit 823ded1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

R/step_adjust_latency.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ step_adjust_latency_new <-
165165
# lags introduces max(lags) NA's after the max_time_value.
166166
# TODO all of the shifting happens before NA removal, which saves all the data I might possibly want; I should probably add a bit that makes sure this operation is happening before NA removal so data doesn't get dropped
167167
#' @export
168-
#' @importFrom glue glue
169168
prep.step_adjust_latency <- function(x, training, info = NULL, ...) {
170169
if ((x$method == "extend_ahead") && (!("outcome" %in% info$role))) {
171170
cli::cli_abort('If `method` is `"extend_ahead"`, then a step ",
@@ -207,7 +206,7 @@ prep.step_adjust_latency <- function(x, training, info = NULL, ...) {
207206
((time_type == "year") && (latency >= 1))
208207
) {
209208
cli::cli_warn(c(
210-
"!" = glue(
209+
"!" = glue::glue(
211210
"The shift has been adjusted by {latency}, ",
212211
"which is questionable for it's `time_type` of ",
213212
"{time_type}"

R/utils-latency.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,10 @@ construct_shift_tibble <- function(terms_used, recipe, rel_step_type, shift_name
7676
#' @keywords internal
7777
#' @importFrom dplyr rowwise %>%
7878
#' @importFrom purrr map_lgl
79-
#' @importFrom glue glue
8079
get_latent_column_tibble <- function(
8180
shift_cols, new_data, as_of, latency,
8281
sign_shift, info, call = caller_env()) {
83-
shift_cols <- shift_cols %>% mutate(original_name = glue("{prefix}{shift}_{terms}"))
82+
shift_cols <- shift_cols %>% mutate(original_name = glue::glue("{prefix}{shift}_{terms}"))
8483
if (is.null(latency)) {
8584
shift_cols <- shift_cols %>%
8685
rowwise() %>%
@@ -105,7 +104,7 @@ get_latent_column_tibble <- function(
105104
effective_shift = shift + abs(latency)
106105
) %>%
107106
mutate(
108-
new_name = glue("{prefix}{effective_shift}_{terms}")
107+
new_name = glue::glue("{prefix}{effective_shift}_{terms}")
109108
)
110109
info <- info %>% select(variable, type, role)
111110
shift_cols <- left_join(shift_cols, info, by = join_by(original_name == variable))

0 commit comments

Comments
 (0)