From 0e3f73e1b0be8c85255cd157fa9b109e23c4a53c Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Thu, 28 Sep 2023 11:57:39 -0700 Subject: [PATCH] use right amount of bangs --- R/rename.R | 2 +- R/slice.R | 8 ++++---- man/step_dummy_extract.Rd | 2 +- man/step_rename.Rd | 2 +- man/step_slice.Rd | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/rename.R b/R/rename.R index 255a77cc7..edbe5a22b 100644 --- a/R/rename.R +++ b/R/rename.R @@ -34,7 +34,7 @@ #' vars <- c(var1 = "cyl", var2 = "am") #' car_rec <- #' recipe(~., data = mtcars) %>% -#' step_rename(!!vars) +#' step_rename(!!!vars) #' #' car_rec %>% #' prep() %>% diff --git a/R/slice.R b/R/slice.R index e399301b3..7f5498562 100644 --- a/R/slice.R +++ b/R/slice.R @@ -46,8 +46,8 @@ #' dplyr_test <- #' iris %>% #' as_tibble() %>% -#' slice(76:150) %>% -#' slice(1:3) +#' slice(76:150) +#' #' rec_test <- bake(prepped, iris %>% slice(76:150)) #' all.equal(dplyr_test, rec_test) #' @@ -58,8 +58,8 @@ #' #' qq_rec <- #' recipe(~., data = iris) %>% -#' # Embed `keep_rows` in the call using !! -#' step_slice(!!keep_rows) %>% +#' # Embed `keep_rows` in the call using !!! +#' step_slice(!!!keep_rows) %>% #' prep(training = iris) #' #' tidy(qq_rec, number = 1) diff --git a/man/step_dummy_extract.Rd b/man/step_dummy_extract.Rd index 1351fe034..2abb63280 100644 --- a/man/step_dummy_extract.Rd +++ b/man/step_dummy_extract.Rd @@ -81,7 +81,7 @@ model terms for the extracted levels. } \details{ \code{step_dummy_extract()} will create a set of integer dummy -variables from a character variable by extract individual strings +variables from a character variable by extracting individual strings by either splitting or extracting then counting those to create count variables. diff --git a/man/step_rename.Rd b/man/step_rename.Rd index 10c5805e6..59172e7fa 100644 --- a/man/step_rename.Rd +++ b/man/step_rename.Rd @@ -75,7 +75,7 @@ recipe(~., data = iris) \%>\% vars <- c(var1 = "cyl", var2 = "am") car_rec <- recipe(~., data = mtcars) \%>\% - step_rename(!!vars) + step_rename(!!!vars) car_rec \%>\% prep() \%>\% diff --git a/man/step_slice.Rd b/man/step_slice.Rd index 69a066ea6..9f2aaf21f 100644 --- a/man/step_slice.Rd +++ b/man/step_slice.Rd @@ -108,8 +108,8 @@ keep_rows <- 1:6 qq_rec <- recipe(~., data = iris) \%>\% - # Embed `keep_rows` in the call using !! - step_slice(!!keep_rows) \%>\% + # Embed `keep_rows` in the call using !!! + step_slice(!!!keep_rows) \%>\% prep(training = iris) tidy(qq_rec, number = 1)