Skip to content

Commit 3316b5e

Browse files
authored
Add small explanation to the docs of recode_values() (#669)
Add small explanation to the docs
1 parent 72ca484 commit 3316b5e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

R/recode_values.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
#' element names have to be surrounded in backticks. For example,
1414
#' ``recode=list(`0`=1)`` would recode all `1` into `0` in a numeric
1515
#' vector. See also 'Examples' and 'Details'.
16-
#' @param default Defines the default value for all values that have
17-
#' no match in the recode-pairs. Note that, if `preserve_na=FALSE`, missing
18-
#' values (`NA`) are also captured by the `default` argument, and thus will
19-
#' also be recoded into the specified value. See 'Examples' and 'Details'.
16+
#' @param default Defines the default value for all values that have no match in
17+
#' the recode-pairs. If `NULL`, original values will be preserved when there
18+
#' is no match. Note that, if `preserve_na=FALSE`, missing values (`NA`) are
19+
#' also captured by the `default` argument, and thus will also be recoded into
20+
#' the specified value. See 'Examples' and 'Details'.
2021
#' @param preserve_na Logical, if `TRUE`, `NA` (missing values) are preserved.
2122
#' This overrides any other arguments, including `default`. Hence, if
2223
#' `preserve_na=TRUE`, `default` will no longer convert `NA` into the specified

man/recode_values.Rd

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)