Replace a boolean variable
replace_boolean.Rd
Replace a boolean
Arguments
- x
A boolean vector
- true_value
A single value, that will replace TRUE values
- false_value
A single value, that will replace FALSE values
Examples
replace_boolean(c(T,T,T,F,F),1,2)
#> [1] 1 1 1 2 2