fp_add_scale {adas.utils} | R Documentation |
Scale factors levels
Description
This function allows to add columns to a design matrix with scaled factor, i.e. factors reported in real units rather in coded units (e.g. -1, 1).
Usage
fp_add_scale(dm, ..., suffix = "_s")
Arguments
dm |
the design matrix to scale. |
... |
a set of factors to scale, with their respective ranges, e.g.
|
suffix |
the suffix to add to the scaled factor name in creating new columns. If the suffix is the empty string, factors are replaced. |
Value
the design matrix with the scaled factors.
Examples
fp_design_matrix(3, rep=2) %>%
fp_add_scale(A=c(10, 30), B=c(0, 1), suffix=".scaled")
[Package adas.utils version 1.2.0 Index]