recode_if: Recode a value based on predicate condition

Description Usage Arguments

View source: R/misc.R

Description

A simple wrapper around dplyr::recode().

Usage

1

Arguments

x

Input vector

condition

Conditions upon which the replacement should occurr

...

Arguments passed on to dplyr::recode

.x

A vector to modify

.default

If supplied, all values not otherwise matched will be given this value. If not supplied and if the replacements are the same type as the original values in .x, unmatched values are not changed. If not supplied and if the replacements are not compatible, unmatched values are replaced with NA.

.default must be either length 1 or the same length as .x.

.missing

If supplied, any missing values in .x will be replaced by this value. Must be either length 1 or the same length as .x.


GerkeLab/grkmisc documentation built on Feb. 23, 2020, 6:50 a.m.