Learn R Programming

pwrFDR (version 2.8.9)

if.y.z: A helper function -- substitute y's with a specified 'z'.

Description

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.

Usage

if.y.z(x, y = 0, z = 1)

Arguments

x

A numeric, character or boolean vector

y

The valued to be swapped out

z

The value which replaces swapped out values

Value

A numeric, character or boolean vector, equal to the input vector, x, except with occurences y replaced with the value z