From c0d63f0a6a8fe47f6d2f73903ccf35184c5262f8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 19 Dec 2023 13:07:16 +0100 Subject: [PATCH] add example --- R/to_numeric.R | 2 ++ man/to_numeric.Rd | 2 ++ 2 files changed, 4 insertions(+) diff --git a/R/to_numeric.R b/R/to_numeric.R index c0b382fd1..1dcab4371 100644 --- a/R/to_numeric.R +++ b/R/to_numeric.R @@ -40,6 +40,8 @@ #' x <- as.factor(mtcars$gear) #' to_numeric(x, dummy_factors = FALSE) #' to_numeric(x, dummy_factors = FALSE, preserve_levels = TRUE) +#' # same as: +#' coerce_to_numeric(x) #' #' @return A data frame of numeric variables. #' diff --git a/man/to_numeric.Rd b/man/to_numeric.Rd index 1868df008..7c78b1ba6 100644 --- a/man/to_numeric.Rd +++ b/man/to_numeric.Rd @@ -132,5 +132,7 @@ to_numeric(head(ToothGrowth), dummy_factors = FALSE) x <- as.factor(mtcars$gear) to_numeric(x, dummy_factors = FALSE) to_numeric(x, dummy_factors = FALSE, preserve_levels = TRUE) +# same as: +coerce_to_numeric(x) }