diff --git a/DESCRIPTION b/DESCRIPTION index 1c8de59242..81dc5a80b2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -64,4 +64,4 @@ Config/testthat/edition: 3 Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/NAMESPACE b/NAMESPACE index 1fcfce0e82..5689062356 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -120,6 +120,8 @@ S3method(rbind,grouped_df) S3method(recode,character) S3method(recode,factor) S3method(recode,numeric) +S3method(recode_default,default) +S3method(recode_default,factor) S3method(reframe,data.frame) S3method(relocate,data.frame) S3method(rename,data.frame) diff --git a/R/recode.R b/R/recode.R index 6242b27717..98135959e6 100644 --- a/R/recode.R +++ b/R/recode.R @@ -239,6 +239,7 @@ recode_default <- function(x, default, out) { UseMethod("recode_default") } +#' @export recode_default.default <- function(x, default, out) { same_type <- identical(typeof(x), typeof(out)) if (is.null(default) && same_type) { @@ -248,6 +249,7 @@ recode_default.default <- function(x, default, out) { } } +#' @export recode_default.factor <- function(x, default, out) { if (is.null(default)) { if ((is.character(out) || is.factor(out)) && is.factor(x)) {