View source: R/mapper-function-helpers.R
manage_helper_col | R Documentation |
If your consistency test mapper function supports helper
columns, call manage_helper_col()
internally; once for every such column.
It will check whether a helper column is compatible with its eponymous
argument, i.e., if the argument was not specified by the user but has its
default value.
By default (affix = TRUE
), the function will add the column to the
mapper's input data frame. It returns the input data frame, so reassign its
output to that variable.
All of this only works in mapper functions that were "handwritten" using
function()
, as opposed to those produced by function_map()
. See
vignette("consistency-tests-in-depth")
, section Writing mappers
manually.
manage_helper_col(data, var_arg, default, affix = TRUE)
data |
The data frame that is the mapper function's first argument. |
var_arg |
The argument to the mapper function that has the same name as the helper column you want to manage. |
default |
The default for the argument that was specified in |
affix |
Logical (length 1). If |
data
, possibly modified (see affix
argument).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.