default.Rd
Give default value if doesn't exist
default(x, default, rm_na = TRUE)
x | The value to test if it exists |
---|---|
default | The default value |
rm_na | Replace NA values with the default |
the value or default
a <- 1 default(a, 2) # should return 1#> [1] 1#> [1] 2