Description Usage Arguments Value Functions Author(s)
Performs log transformation on a numeric object. The data can be scaled first if requested by dividing X by the provided scaling factor.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | log_transform(
x,
log_base = 2,
scaling_factor = 1,
pseudo_count = 1,
verbose = FALSE
)
reverse_log_transform(
x,
log_base = 2,
scaling_factor = 1,
pseudo_count = 1,
verbose = FALSE
)
|
x |
a numeric object (i.e. vector or matrix) |
log_base |
a positive number representing the base with respect to which the logarithm will be computed. Default is 2 |
scaling_factor |
a positive number by which the data will be scaled, i.e. divided prior to log computation. Default is 1, i.e. no scaling |
pseudo_count |
a positive number which will be added to the possibly scaled x prior to log computation to avoid taking the logarithm of zero. Default is 1 |
verbose |
suppresses all messages from this function. Default is FALSE. |
A log-transformed numeric object.
reverse_log_transform
: Reverses the log transformation, i.e
scaling_factor * (log_base^x - pseudo_count)
Avishay Spitzer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.