rvifelse
is the rv
-compatible version of the function ifelse
.
rvifelse (test, yes, no)
test
size
times length(x)
.
rvifelse
returns a random value with the same shape as
test
which is filled with random or constant elements selected from either
yes
or no
,
depending on whether the random draw in an
element of test
is TRUE
or FALSE
.
See also vignette("rv")
.
ifelse
.