Skip to content

Commit

Permalink
Add @export tags for internal S3 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Feb 13, 2024
1 parent 240da9e commit d698022
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions R/recode.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)) {
Expand Down

0 comments on commit d698022

Please sign in to comment.