View source: R/post_processing.R
do_processing | R Documentation |
Applies functions to a matrix or data.frame.
do_processing(x, functions = list())
x |
Matrix or Data.frame. |
functions |
List of lists, specifying functions to be applied as well as their arguments. See details. |
Functions are passed into the post-processor as a named list. The name
f
of the list entry is the function to be applied via
base::do.call
.
The list entry itself is another named list, specifying the arguments
to the function f
as named arguments.
The functions must take a matrix or data.frame as first argument and return another matrix or data.frame of the same dimensions as single output.
Examples of post-processing steps are truncation
(process_truncate_by_iqr
,
process_truncate_by_threshold
) or
centering / standardizing data (via scale
,
see example section below).
Can be useful to apply on simulated datasets, even outside of the simulation function (e.g. when standardization is only required at the modeling step).
Matrix or data.frame with post-processing applied.
Use with caution - no error checking is done for now so the user has to take care of everything themselves! Furthermore, output of the functions is not checked either.
do_processing(diag(5),
functions = list(scale = list(center = TRUE, scale = FALSE)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.