View source: R/post_processing.R
process_truncate_by_threshold | R Documentation |
Truncation based on fixed thresholds to be applied to a dataset. Allows to implement truncation by measures derived from the overall data generating mechanism.
process_truncate_by_threshold(
x,
truncate_lower = NA,
truncate_upper = NA,
only_numeric = TRUE
)
x |
Matrix or Data.frame. |
truncate_lower , truncate_upper |
Vectors of truncation parameters, i.e. lower and upper tresholds for
truncation.
Either a single value which is replicated as necessary or of same dimension
as |
only_numeric |
If TRUE and if |
Truncation is defined by setting all values below or above the truncation threshold to the truncation threshold.
Truncation parameters can be specified in three ways (note that whenever
only_numeric
is set to TRUE, then only numeric columns are affected):
A single numeric - then all columns will be processed in the same way
A numeric vector without names - it is assumed that the length can be
replicated to the number of columns in x
, each column is processed by the
corresponding value in the vector
A numeric vector with names - length can differ from the columns in
x
and only the columns for which the names occur in the vector are
processed
Matrix or data.frame of same dimensions as input.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.