Removes a specified value from a vector.

strip_value(x, value = NA)

Arguments

x

A vector of values.

value

The value to remove (defaults to NA)

Value

A vector of values sans the one removed.

Examples

x <- c( 1, 2, NA, 3 )
print( strip_value(x) )
#> [1] 1 2 3

x <- c( 'Hello', '', 'world' )
print( strip_value(x, '') )
#> [1] "Hello" "world"