diff --git a/DESCRIPTION b/DESCRIPTION index c9f250a..61d303f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -61,4 +61,4 @@ Config/testthat/edition: 3 Config/usethis/last-upkeep: 2025-04-24 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 diff --git a/R/collapse_cart.R b/R/collapse_cart.R index fc34fca..e278f9f 100644 --- a/R/collapse_cart.R +++ b/R/collapse_cart.R @@ -66,6 +66,7 @@ #' ) |> #' prep() #' tidy(rec, number = 1) +#' @seealso [step_collapse_stringdist()] #' @export step_collapse_cart <- function( diff --git a/R/collapse_stringdist.R b/R/collapse_stringdist.R index e1303fc..f7fa38d 100644 --- a/R/collapse_stringdist.R +++ b/R/collapse_stringdist.R @@ -65,6 +65,7 @@ #' bake(new_data = NULL) #' #' tidy(rec, 1) +#' @seealso [step_collapse_cart()] #' @export step_collapse_stringdist <- function( @@ -185,7 +186,9 @@ collapse_stringdist_impl <- function(x, dist, method, options) { repeat { group[selected] <- TRUE new_selected <- pairs[pairs[, 2] %in% selected, 1] - if (length(new_selected) == 0) break + if (length(new_selected) == 0) { + break + } pairs <- pairs[!pairs[, 2] %in% selected, , drop = FALSE] selected <- new_selected } diff --git a/R/discretize_cart.R b/R/discretize_cart.R index 84f780e..c8afd65 100644 --- a/R/discretize_cart.R +++ b/R/discretize_cart.R @@ -86,8 +86,7 @@ #' tidy(cart_rec, id = "cart splits") #' #' bake(cart_rec, ad_data_te, tau) -#' @seealso [embed::step_discretize_xgb()], [recipes::recipe()], -#' [recipes::prep()], [recipes::bake()] +#' @seealso [recipes::step_discretize()], [step_discretize_xgb()] #' @export step_discretize_cart <- function( diff --git a/R/discretize_xgb.R b/R/discretize_xgb.R index afe8702..76eb21f 100644 --- a/R/discretize_xgb.R +++ b/R/discretize_xgb.R @@ -99,8 +99,7 @@ #' xgb_rec <- prep(xgb_rec, training = credit_data_tr) #' #' bake(xgb_rec, credit_data_te, Assets) -#' @seealso [embed::step_discretize_cart()], [recipes::recipe()], -#' [recipes::prep()], [recipes::bake()] +#' @seealso [recipes::step_discretize()], [step_discretize_cart()] #' @export step_discretize_xgb <- function( diff --git a/R/lencode.R b/R/lencode.R index d29a9be..69db5c6 100644 --- a/R/lencode.R +++ b/R/lencode.R @@ -104,6 +104,7 @@ #' bake(reencoded, grants_other) #' #' tidy(reencoded, 1) +#' @seealso [step_lencode_bayes()], [step_lencode_glm()], [step_lencode_mixed()] #' @export step_lencode <- function( diff --git a/R/lencode_bayes.R b/R/lencode_bayes.R index 9466ff1..c285a34 100644 --- a/R/lencode_bayes.R +++ b/R/lencode_bayes.R @@ -104,6 +104,7 @@ #' reencoded <- recipe(class ~ sponsor_code, data = grants_other) |> #' step_lencode_bayes(sponsor_code, outcome = vars(class)) #' } +#' @seealso [step_lencode()], [step_lencode_glm()], [step_lencode_mixed()] #' @export step_lencode_bayes <- function( diff --git a/R/lencode_glm.R b/R/lencode_glm.R index cef5204..0ce7365 100644 --- a/R/lencode_glm.R +++ b/R/lencode_glm.R @@ -78,6 +78,7 @@ #' reencoded <- recipe(class ~ sponsor_code, data = grants_other) |> #' step_lencode_glm(sponsor_code, outcome = vars(class)) #' } +#' @seealso [step_lencode()], [step_lencode_bayes()], [step_lencode_mixed()] #' @export step_lencode_glm <- function( diff --git a/R/lencode_mixed.R b/R/lencode_mixed.R index 1c30bb6..7490fb2 100644 --- a/R/lencode_mixed.R +++ b/R/lencode_mixed.R @@ -91,6 +91,7 @@ #' reencoded <- recipe(class ~ sponsor_code, data = grants_other) |> #' step_lencode_mixed(sponsor_code, outcome = vars(class)) #' } +#' @seealso [step_lencode()], [step_lencode_bayes()], [step_lencode_glm()] #' @export step_lencode_mixed <- function( diff --git a/R/pca_sparse.R b/R/pca_sparse.R index c077eb4..3419fc7 100644 --- a/R/pca_sparse.R +++ b/R/pca_sparse.R @@ -64,7 +64,9 @@ #' #' @template case-weights-not-supported #' -#' @seealso [step_pca_sparse_bayes()] +#' @seealso [recipes::step_pca()], [recipes::step_kpca()], +#' [recipes::step_kpca_poly()], [recipes::step_kpca_rbf()], +#' [step_pca_sparse_bayes()], [step_pca_truncated()] #' @examplesIf rlang::is_installed(c("modeldata", "ggplot2")) #' library(recipes) #' library(ggplot2) diff --git a/R/pca_sparse_bayes.R b/R/pca_sparse_bayes.R index 247f0a4..565e8b4 100644 --- a/R/pca_sparse_bayes.R +++ b/R/pca_sparse_bayes.R @@ -83,7 +83,9 @@ #' #' @template case-weights-not-supported #' -#' @seealso [step_pca_sparse()] +#' @seealso [recipes::step_pca()], [recipes::step_kpca()], +#' [recipes::step_kpca_poly()], [recipes::step_kpca_rbf()], +#' [step_pca_sparse()], [step_pca_truncated()] #' @examplesIf rlang::is_installed(c("modeldata", "ggplot2")) #' library(recipes) #' library(ggplot2) diff --git a/R/pca_truncated.R b/R/pca_truncated.R index c7a921a..d2c616b 100644 --- a/R/pca_truncated.R +++ b/R/pca_truncated.R @@ -83,6 +83,9 @@ #' #' tidy(pca_trans, number = 2) #' tidy(pca_estimates, number = 2) +#' @seealso [recipes::step_pca()], [recipes::step_kpca()], +#' [recipes::step_kpca_poly()], [recipes::step_kpca_rbf()], +#' [step_pca_sparse_bayes()], [step_pca_sparse()] #' @export step_pca_truncated <- function( recipe, diff --git a/man/embed-package.Rd b/man/embed-package.Rd index 4a19ee0..8eb6ce6 100644 --- a/man/embed-package.Rd +++ b/man/embed-package.Rd @@ -29,7 +29,7 @@ Authors: Other contributors: \itemize{ - \item Posit Software, PBC (03wc8by49) [copyright holder, funder] + \item Posit Software, PBC (\href{https://ror.org/03wc8by49}{ROR}) [copyright holder, funder] } } diff --git a/man/step_collapse_cart.Rd b/man/step_collapse_cart.Rd index c204f4c..d25b0c2 100644 --- a/man/step_collapse_cart.Rd +++ b/man/step_collapse_cart.Rd @@ -90,7 +90,7 @@ The underlying operation does not allow for case weights. } \examples{ -\dontshow{if (rlang::is_installed(c("modeldata", "rpart"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("modeldata", "rpart"))) withAutoprint(\{ # examplesIf} data(ames, package = "modeldata") ames$Sale_Price <- log10(ames$Sale_Price) @@ -104,3 +104,6 @@ rec <- tidy(rec, number = 1) \dontshow{\}) # examplesIf} } +\seealso{ +\code{\link[=step_collapse_stringdist]{step_collapse_stringdist()}} +} diff --git a/man/step_collapse_stringdist.Rd b/man/step_collapse_stringdist.Rd index 60c43a2..6bc6a5e 100644 --- a/man/step_collapse_stringdist.Rd +++ b/man/step_collapse_stringdist.Rd @@ -85,7 +85,7 @@ The underlying operation does not allow for case weights. } \examples{ -\dontshow{if (rlang::is_installed("stringdist")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("stringdist")) withAutoprint(\{ # examplesIf} library(recipes) library(tibble) data0 <- tibble( @@ -112,3 +112,6 @@ rec |> tidy(rec, 1) \dontshow{\}) # examplesIf} } +\seealso{ +\code{\link[=step_collapse_cart]{step_collapse_cart()}} +} diff --git a/man/step_discretize_cart.Rd b/man/step_discretize_cart.Rd index 9280d17..1e97be1 100644 --- a/man/step_discretize_cart.Rd +++ b/man/step_discretize_cart.Rd @@ -106,7 +106,7 @@ To use them, see the documentation in \link[recipes:case_weights]{recipes::case_ } \examples{ -\dontshow{if (rlang::is_installed("modeldata")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("modeldata")) withAutoprint(\{ # examplesIf} library(modeldata) data(ad_data) library(rsample) @@ -132,6 +132,5 @@ bake(cart_rec, ad_data_te, tau) \dontshow{\}) # examplesIf} } \seealso{ -\code{\link[=step_discretize_xgb]{step_discretize_xgb()}}, \code{\link[recipes:recipe]{recipes::recipe()}}, -\code{\link[recipes:prep]{recipes::prep()}}, \code{\link[recipes:bake]{recipes::bake()}} +\code{\link[recipes:step_discretize]{recipes::step_discretize()}}, \code{\link[=step_discretize_xgb]{step_discretize_xgb()}} } diff --git a/man/step_discretize_xgb.Rd b/man/step_discretize_xgb.Rd index cacc7e7..3fa8552 100644 --- a/man/step_discretize_xgb.Rd +++ b/man/step_discretize_xgb.Rd @@ -129,7 +129,7 @@ To use them, see the documentation in \link[recipes:case_weights]{recipes::case_ } \examples{ -\dontshow{if (rlang::is_installed(c("xgboost", "modeldata"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("xgboost", "modeldata"))) withAutoprint(\{ # examplesIf} library(rsample) library(recipes) data(credit_data, package = "modeldata") @@ -151,6 +151,5 @@ bake(xgb_rec, credit_data_te, Assets) \dontshow{\}) # examplesIf} } \seealso{ -\code{\link[=step_discretize_cart]{step_discretize_cart()}}, \code{\link[recipes:recipe]{recipes::recipe()}}, -\code{\link[recipes:prep]{recipes::prep()}}, \code{\link[recipes:bake]{recipes::bake()}} +\code{\link[recipes:step_discretize]{recipes::step_discretize()}}, \code{\link[=step_discretize_cart]{step_discretize_cart()}} } diff --git a/man/step_embed.Rd b/man/step_embed.Rd index 7b940dc..eb56e35 100644 --- a/man/step_embed.Rd +++ b/man/step_embed.Rd @@ -177,7 +177,7 @@ The underlying operation does not allow for case weights. } \examples{ -\dontshow{if (!embed:::is_cran_check() && rlang::is_installed(c("modeldata", "keras3"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (!embed:::is_cran_check() && rlang::is_installed(c("modeldata", "keras3"))) withAutoprint(\{ # examplesIf} data(grants, package = "modeldata") set.seed(1) diff --git a/man/step_lencode.Rd b/man/step_lencode.Rd index f3bc7d1..c4a76b7 100644 --- a/man/step_lencode.Rd +++ b/man/step_lencode.Rd @@ -112,7 +112,7 @@ To use them, see the documentation in \link[recipes:case_weights]{recipes::case_ } \examples{ -\dontshow{if (rlang::is_installed("modeldata")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("modeldata")) withAutoprint(\{ # examplesIf} library(recipes) library(dplyr) library(modeldata) @@ -138,5 +138,8 @@ Explorations Newsletter, 3(1), 27-32. Zumel N and Mount J (2017) "vtreat: a data.frame Processor for Predictive Modeling," arXiv:1611.09477 } +\seealso{ +\code{\link[=step_lencode_bayes]{step_lencode_bayes()}}, \code{\link[=step_lencode_glm]{step_lencode_glm()}}, \code{\link[=step_lencode_mixed]{step_lencode_mixed()}} +} \concept{preprocessing encoding} \keyword{datagen} diff --git a/man/step_lencode_bayes.Rd b/man/step_lencode_bayes.Rd index 4c1969a..2ea7916 100644 --- a/man/step_lencode_bayes.Rd +++ b/man/step_lencode_bayes.Rd @@ -107,7 +107,7 @@ To use them, see the documentation in \link[recipes:case_weights]{recipes::case_ } \examples{ -\dontshow{if (rlang::is_installed("modeldata")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("modeldata")) withAutoprint(\{ # examplesIf} library(recipes) library(dplyr) library(modeldata) @@ -139,5 +139,8 @@ Modeling," arXiv:1611.09477 "Estimating Generalized (Non-)Linear Models with Group-Specific Terms with \code{rstanarm}" \url{http://mc-stan.org/rstanarm/articles/glmer.html} } +\seealso{ +\code{\link[=step_lencode]{step_lencode()}}, \code{\link[=step_lencode_glm]{step_lencode_glm()}}, \code{\link[=step_lencode_mixed]{step_lencode_mixed()}} +} \concept{preprocessing encoding} \keyword{datagen} diff --git a/man/step_lencode_glm.Rd b/man/step_lencode_glm.Rd index 44f668b..a883ae6 100644 --- a/man/step_lencode_glm.Rd +++ b/man/step_lencode_glm.Rd @@ -87,7 +87,7 @@ To use them, see the documentation in \link[recipes:case_weights]{recipes::case_ } \examples{ -\dontshow{if (rlang::is_installed("modeldata")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("modeldata")) withAutoprint(\{ # examplesIf} library(recipes) library(dplyr) library(modeldata) @@ -110,5 +110,8 @@ Explorations Newsletter, 3(1), 27-32. Zumel N and Mount J (2017) "vtreat: a data.frame Processor for Predictive Modeling," arXiv:1611.09477 } +\seealso{ +\code{\link[=step_lencode]{step_lencode()}}, \code{\link[=step_lencode_bayes]{step_lencode_bayes()}}, \code{\link[=step_lencode_mixed]{step_lencode_mixed()}} +} \concept{preprocessing encoding} \keyword{datagen} diff --git a/man/step_lencode_mixed.Rd b/man/step_lencode_mixed.Rd index c0692c8..ae9075f 100644 --- a/man/step_lencode_mixed.Rd +++ b/man/step_lencode_mixed.Rd @@ -101,7 +101,7 @@ To use them, see the documentation in \link[recipes:case_weights]{recipes::case_ } \examples{ -\dontshow{if (rlang::is_installed("modeldata")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("modeldata")) withAutoprint(\{ # examplesIf} library(recipes) library(dplyr) library(modeldata) @@ -124,5 +124,8 @@ Explorations Newsletter, 3(1), 27-32. Zumel N and Mount J (2017) "vtreat: a data.frame Processor for Predictive Modeling," arXiv:1611.09477 } +\seealso{ +\code{\link[=step_lencode]{step_lencode()}}, \code{\link[=step_lencode_bayes]{step_lencode_bayes()}}, \code{\link[=step_lencode_glm]{step_lencode_glm()}} +} \concept{preprocessing encoding} \keyword{datagen} diff --git a/man/step_pca_sparse.Rd b/man/step_pca_sparse.Rd index 17c3fa8..e6300a0 100644 --- a/man/step_pca_sparse.Rd +++ b/man/step_pca_sparse.Rd @@ -114,7 +114,7 @@ The underlying operation does not allow for case weights. } \examples{ -\dontshow{if (rlang::is_installed(c("modeldata", "ggplot2"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("modeldata", "ggplot2"))) withAutoprint(\{ # examplesIf} library(recipes) library(ggplot2) @@ -142,7 +142,9 @@ tidy(ad_rec, id = "sparse pca") |> \dontshow{\}) # examplesIf} } \seealso{ -\code{\link[=step_pca_sparse_bayes]{step_pca_sparse_bayes()}} +\code{\link[recipes:step_pca]{recipes::step_pca()}}, \code{\link[recipes:step_kpca]{recipes::step_kpca()}}, +\code{\link[recipes:step_kpca_poly]{recipes::step_kpca_poly()}}, \code{\link[recipes:step_kpca_rbf]{recipes::step_kpca_rbf()}}, +\code{\link[=step_pca_sparse_bayes]{step_pca_sparse_bayes()}}, \code{\link[=step_pca_truncated]{step_pca_truncated()}} } \concept{pca} \concept{preprocessing} diff --git a/man/step_pca_sparse_bayes.Rd b/man/step_pca_sparse_bayes.Rd index 7e6a10e..884ccb8 100644 --- a/man/step_pca_sparse_bayes.Rd +++ b/man/step_pca_sparse_bayes.Rd @@ -134,7 +134,7 @@ The underlying operation does not allow for case weights. } \examples{ -\dontshow{if (rlang::is_installed(c("modeldata", "ggplot2"))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed(c("modeldata", "ggplot2"))) withAutoprint(\{ # examplesIf} library(recipes) library(ggplot2) @@ -167,7 +167,9 @@ Ning, B. (2021). Spike and slab Bayesian sparse principal component analysis. arXiv:2102.00305. } \seealso{ -\code{\link[=step_pca_sparse]{step_pca_sparse()}} +\code{\link[recipes:step_pca]{recipes::step_pca()}}, \code{\link[recipes:step_kpca]{recipes::step_kpca()}}, +\code{\link[recipes:step_kpca_poly]{recipes::step_kpca_poly()}}, \code{\link[recipes:step_kpca_rbf]{recipes::step_kpca_rbf()}}, +\code{\link[=step_pca_sparse]{step_pca_sparse()}}, \code{\link[=step_pca_truncated]{step_pca_truncated()}} } \concept{pca} \concept{preprocessing} diff --git a/man/step_pca_truncated.Rd b/man/step_pca_truncated.Rd index 6d8e55f..4e1d60d 100644 --- a/man/step_pca_truncated.Rd +++ b/man/step_pca_truncated.Rd @@ -153,3 +153,8 @@ tidy(pca_estimates, number = 2) \references{ Jolliffe, I. T. (2010). \emph{Principal Component Analysis}. Springer. } +\seealso{ +\code{\link[recipes:step_pca]{recipes::step_pca()}}, \code{\link[recipes:step_kpca]{recipes::step_kpca()}}, +\code{\link[recipes:step_kpca_poly]{recipes::step_kpca_poly()}}, \code{\link[recipes:step_kpca_rbf]{recipes::step_kpca_rbf()}}, +\code{\link[=step_pca_sparse_bayes]{step_pca_sparse_bayes()}}, \code{\link[=step_pca_sparse]{step_pca_sparse()}} +} diff --git a/man/step_umap.Rd b/man/step_umap.Rd index 806c168..f4c003c 100644 --- a/man/step_umap.Rd +++ b/man/step_umap.Rd @@ -166,7 +166,7 @@ prepped recipes, see the \href{https://rstudio.github.io/bundle/}{bundle} packag } \examples{ -\dontshow{if (rlang::is_installed("ggplot2") && rlang::is_installed("irlba", version = "2.3.5.2")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("ggplot2") && rlang::is_installed("irlba", version = "2.3.5.2")) withAutoprint(\{ # examplesIf} library(recipes) library(ggplot2) diff --git a/man/step_woe.Rd b/man/step_woe.Rd index cd6291e..62e6f01 100644 --- a/man/step_woe.Rd +++ b/man/step_woe.Rd @@ -137,7 +137,7 @@ The underlying operation does not allow for case weights. } \examples{ -\dontshow{if (rlang::is_installed("modeldata")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("modeldata")) withAutoprint(\{ # examplesIf} library(modeldata) data("credit_data")