Operation's control parameters

op_ctrl(
  output_mode,
  output_class = "vector",
  na_action = "exclude",
  cols = NULL,
  rows = NULL,
  factor_mode = "character",
  ...
)

Arguments

output_mode

Desired base::storage.mode() for the result.

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 NULL, all columns are used. If its length is 0, no columns are considered. Negative numbers, logical values, character vectors representing column names, and tidyselect::select_helpers are supported.

rows

Like cols but for row indices, and without tidyselect support.

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.

Details

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

Note

Abbreviations are supported in accordance to the rules from base::match.arg().