- .fn
Single-case function to apply to each row. It must return a
single logical value or, if .col_names is specified, a list of values
with the key result first.
- .reported
String. Names of the arguments of .fn that take the
reported values, such as c("x", "n"). These become the key columns. May
be NULL if .reported_variadic is specified. Key and helper columns
named n, items_averaged, or absolute are taken to be whole numbers,
as are the decimal counts of .args_by_row: a value within floating-point
noise of one, such as 100 * 0.29, is rounded to it before .fn sees it.
- .name_test
String (length 1). Plain-text name of the test, such as
"GRIM".
- .name_key_result
(Experimental) String (length 1). Name of the key
result column. Default is "consistency".
- .name_class
String. Optionally, one or more classes to add to the
output. Default is NULL; see Details for the class that is always
added.
- .args_disabled
Optionally, names of arguments of .fn that the
factory-made function should not have. Specifying one of them is an error.
- .args_by_row
Optionally, names of arguments of .fn that may vary
by row, such as "digits_x". The factory-made function takes a single
value or one per row of data for each. If one is left out, it is read
from a column of data by that name, if there is one. They are returned
as columns. One whose name starts with digits_ is a decimal count,
returned as integer like digits_x.
- .args_fixed
Optionally, a named list of values that are always passed
to .fn, such as list(show_reason = TRUE). The factory-made function
has no arguments for them; specifying one is an error.
- .cols_helper
Optionally, names of arguments of .fn that may also be
given as columns of data, such as "items_averaged". A helper column is
returned after the key columns if it was given, as a column or as an
argument. Giving both is an error if they disagree.
- .col_names
Optionally, names of the columns that a list returned by
.fn unpacks into, as with show_rec = TRUE. The first name must be
.name_key_result. If data has no rows, the columns are those that
.fn returns for a row of missing values, or, if it fails on one, only
the key result column.
- .cols_derived
Optionally, a named list of vectorized functions that
compute further columns from the same input, such as
list(exp_incon = grim_exp_incon). Each is called once, with the whole
columns and only the arguments it has formals for, and must return one
value per row; a .reported_variadic argument comes as a list of each
row's values. The columns follow the key result column.
- .reported_variadic
Optionally, a single string naming an argument of
.fn that takes the values of one row as a vector. The factory-made
function gets an argument by that name, without a default, that selects
any number of columns with tidyselect syntax. See Details.
- ...
These dots must be empty.