Utility function to run OX
OX_default(
.f,
...,
.then = list(...)[[1]],
.else = rev(list(...))[[1]],
.invert = FALSE
)
(function
)
evaluated as .f(...)
. Must return a vector of indices (logical
or integer
),
which defines which values will be replaced by .else
.
arguments passed to the .f
.
(list
, atomic
, NULL
)
A positive-replacement.
NOTE, that if .then
is not specified directly by named argument then the
first argument from ...
will be taken.
(list
, atomic
, NULL
)
A negative-replacement. Should be of length equal to length of .then
, or
single value or NULL
.
NOTE, that if .else
is not specified directly by named argument then the
last argument from ...
will be considered as a replacement.
(logical(1)
) whether to invert the indices