OX_default: Utility function to run OX

Description Usage Arguments

View source: R/OX2.R

Description

Utility function to run OX

Usage

1
2
3
4
5
6
7
OX_default(
  .f,
  ...,
  .then = list(...)[[1]],
  .else = rev(list(...))[[1]],
  .invert = FALSE
)

Arguments

.f

(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.

.then

(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.

.else

(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.

.invert

(logical(1)) whether to invert the indices


gogonzo/ox documentation built on Dec. 20, 2021, 12:40 p.m.