Operation's control parameters
op_ctrl( output_mode, output_class = "vector", na_action = "exclude", cols = NULL, rows = NULL, factor_mode = "character", ... )
output_mode | Desired |
---|---|
output_class | One of ("vector", "list", "data.frame", "matrix"), possibly abbreviated. |
na_action | One of ("exclude", "pass"), possibly abbreviated. See stats::na.pass for semantics. |
cols | A vector indicating which columns to consider for the operation. If |
rows | Like |
factor_mode | One of ("character", "integer"), possibly abbreviated. If a column is a factor, this determines whether the operation uses its internal integer values, or the character values from its levels. |
... | Internal. |
Each function in this package supports arguments for op_ctrl
through its ellipsis, but
sometimes they don't pay attention to certain options; each function specifies what can be used.
Subsetting with rows
or cols
does not incur a deep copy of the data, only the vector with
desired indices is kept in memory, and look-ups are done. Support for tidyselect
only works
when this function is not called directly.
When a function supports output_mode
, the result is essentially cast to the desired mode, as if
something like as.logical
, as.integer
, or similar was used; currently only supported by
row_means()
.
Abbreviations are supported in accordance to the rules from base::match.arg()
.