y
's with a specified 'z'.A helper function -- in a numeric vector, substitute values equal to 'y' with user specified 'z'. Included at the user level because it's useful for setting up batch jobs.
if.y.z(x, y = 0, z = 1)
A numeric, character or boolean vector
The valued to be swapped out
The value which replaces swapped out values
A numeric, character or boolean vector, equal to the input vector,
x
, except with occurences y
replaced with the value z