diff --git a/NEWS.md b/NEWS.md index 3bb5a487d..3f6bea294 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,8 @@ * Significant speedup in `step_dummy()` when applied to many columns. (#1305) +* Fixed documentation mistake where default value of `keep_original_cols` argument were wrong. (#1314) + # recipes 1.0.10 ## Bug Fixes diff --git a/R/classdist.R b/R/classdist.R index 75fe99d14..c2e2a4ff9 100644 --- a/R/classdist.R +++ b/R/classdist.R @@ -17,6 +17,8 @@ #' the natural log function? #' @param objects Statistics are stored here once this step has #' been trained by [prep()]. +#' @param keep_original_cols A logical to keep the original variables in the +#' output. Defaults to `TRUE`. #' @template step-return #' @family multivariate transformation steps #' @export diff --git a/R/count.R b/R/count.R index 6b521442d..3686ec208 100644 --- a/R/count.R +++ b/R/count.R @@ -3,6 +3,7 @@ #' `step_count()` creates a *specification* of a recipe step that will create a #' variable that counts instances of a regular expression pattern in text. #' +#' @inheritParams step_classdist #' @inheritParams step_pca #' @inheritParams step_center #' @param ... A single selector function to choose which variable diff --git a/R/depth.R b/R/depth.R index d527a0f07..6b07ca83c 100644 --- a/R/depth.R +++ b/R/depth.R @@ -4,6 +4,7 @@ #' numeric data into a measurement of *data depth*. This is done for each value of #' a categorical class variable. #' +#' @inheritParams step_classdist #' @inheritParams step_pca #' @inheritParams step_center #' @param class A single character string that specifies a single diff --git a/R/geodist.R b/R/geodist.R index 91b94fc77..41758c08d 100644 --- a/R/geodist.R +++ b/R/geodist.R @@ -3,6 +3,7 @@ #' `step_geodist()` creates a *specification* of a recipe step that will #' calculate the distance between points on a map to a reference location. #' +#' @inheritParams step_classdist #' @inheritParams step_pca #' @inheritParams step_center #' @param lon,lat Selector functions to choose which variables are diff --git a/R/indicate_na.R b/R/indicate_na.R index f098d5a67..f819c924c 100644 --- a/R/indicate_na.R +++ b/R/indicate_na.R @@ -4,6 +4,7 @@ #' create and append additional binary columns to the data set to indicate which #' observations are missing. #' +#' @inheritParams step_classdist #' @inheritParams step_pca #' @inheritParams step_center #' @param prefix A character string that will be the prefix to the diff --git a/R/interact.R b/R/interact.R index 66e1a4a49..dfe296085 100644 --- a/R/interact.R +++ b/R/interact.R @@ -3,6 +3,7 @@ #' `step_interact()` creates a *specification* of a recipe step that will create #' new columns that are interaction terms between two or more variables. #' +#' @inheritParams step_classdist #' @inheritParams step_pca #' @inheritParams step_center #' @param terms A traditional R formula that contains interaction diff --git a/R/lag.R b/R/lag.R index 8101a90f3..0c710dc08 100644 --- a/R/lag.R +++ b/R/lag.R @@ -5,6 +5,7 @@ #' the lag was induced. These can be removed with [step_naomit()], or you may #' specify an alternative filler value with the `default` argument. #' +#' @inheritParams step_classdist #' @inheritParams step_pca #' @inheritParams step_center #' @param lag A vector of positive integers. Each specified column will be diff --git a/R/regex.R b/R/regex.R index 2ecc0faa4..720b37f9d 100644 --- a/R/regex.R +++ b/R/regex.R @@ -3,6 +3,7 @@ #' `step_regex()` creates a *specification* of a recipe step that will create a #' new dummy variable based on a regular expression. #' +#' @inheritParams step_classdist #' @inheritParams step_pca #' @inheritParams step_center #' @param ... A single selector function to choose which variable diff --git a/R/window.R b/R/window.R index 996f436ad..11d10323b 100644 --- a/R/window.R +++ b/R/window.R @@ -4,6 +4,7 @@ #' new columns that are the results of functions that compute statistics across #' moving windows. #' +#' @inheritParams step_classdist #' @inheritParams step_center #' @inheritParams step_pca #' @param role For model terms created by this step, what analysis diff --git a/man/step_classdist.Rd b/man/step_classdist.Rd index f544a33a1..aeb7c43ef 100644 --- a/man/step_classdist.Rd +++ b/man/step_classdist.Rd @@ -56,7 +56,7 @@ been trained by \code{\link[=prep]{prep()}}.} variables. See notes below.} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked diff --git a/man/step_classdist_shrunken.Rd b/man/step_classdist_shrunken.Rd index e08c11142..eb513c9d9 100644 --- a/man/step_classdist_shrunken.Rd +++ b/man/step_classdist_shrunken.Rd @@ -50,7 +50,7 @@ the natural log function?} variables. See notes below.} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{objects}{Statistics are stored here once this step has been trained by \code{\link[=prep]{prep()}}.} diff --git a/man/step_count.Rd b/man/step_count.Rd index 326acd097..8eec533db 100644 --- a/man/step_count.Rd +++ b/man/step_count.Rd @@ -53,7 +53,7 @@ variable being searched. This is \code{NULL} until computed by \code{\link[=prep]{prep()}}.} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked diff --git a/man/step_depth.Rd b/man/step_depth.Rd index 93ac21c8a..291ad7e2d 100644 --- a/man/step_depth.Rd +++ b/man/step_depth.Rd @@ -57,7 +57,7 @@ depth functions. See \code{\link[ddalpha:depth.halfspace]{ddalpha::depth.halfspa variables. See notes below.} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked diff --git a/man/step_geodist.Rd b/man/step_geodist.Rd index 26ff514c3..03cf5144b 100644 --- a/man/step_geodist.Rd +++ b/man/step_geodist.Rd @@ -54,7 +54,7 @@ issued.} is a placeholder and will be populated once \code{\link[=prep]{prep()}} is used.} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked diff --git a/man/step_indicate_na.Rd b/man/step_indicate_na.Rd index ea76bb771..bac657abd 100644 --- a/man/step_indicate_na.Rd +++ b/man/step_indicate_na.Rd @@ -37,7 +37,7 @@ is a placeholder and will be populated once \code{\link[=prep]{prep()}} is used. resulting new variables. Defaults to "na_ind".} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked diff --git a/man/step_interact.Rd b/man/step_interact.Rd index 65d691ec8..bfb0e422e 100644 --- a/man/step_interact.Rd +++ b/man/step_interact.Rd @@ -40,7 +40,7 @@ interaction (e.g. \code{var1_x_var2} instead of the more traditional \code{var1:var2}).} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked diff --git a/man/step_lag.Rd b/man/step_lag.Rd index 86fb226b5..18225dbb4 100644 --- a/man/step_lag.Rd +++ b/man/step_lag.Rd @@ -44,7 +44,7 @@ left by lagging (defaults to NA).} is a placeholder and will be populated once \code{\link[=prep]{prep()}} is used.} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked diff --git a/man/step_regex.Rd b/man/step_regex.Rd index 6f0ebb606..f8e8cb44c 100644 --- a/man/step_regex.Rd +++ b/man/step_regex.Rd @@ -49,7 +49,7 @@ variable being searched. This is \code{NULL} until computed by \code{\link[=prep]{prep()}}.} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked diff --git a/man/step_window.Rd b/man/step_window.Rd index f966c2528..9a043cb01 100644 --- a/man/step_window.Rd +++ b/man/step_window.Rd @@ -57,7 +57,7 @@ are not sure what columns will be selected, use the the names of the new columns created by the step.} \item{keep_original_cols}{A logical to keep the original variables in the -output. Defaults to \code{FALSE}.} +output. Defaults to \code{TRUE}.} \item{skip}{A logical. Should the step be skipped when the recipe is baked by \code{\link[=bake]{bake()}}? While all operations are baked