logXform: Logarithmic Transformation

View source: R/normalizations.R

logXformR Documentation

Logarithmic Transformation

Description

This function imputes minimum values per the recommendations of Osborne (2002) and subsequently transforms the data to a base-10 logarithmic scale.

Usage

logXform(sample)

Arguments

sample

Nonempty finite numeric vector, matrix, array, or data frame without missing values.

Details

Computes log10((sample - min(sample)) + 1), including when all values are already positive. Centering precedes the unit offset to retain the minimum-1 anchor at large locations. Opposite-sign extremes use equivalent scaled arithmetic to avoid intermediate overflow.

Input must be nonempty and finite, with no NA or NaN. Numeric vectors, matrices, arrays and data frames are accepted; dimensions and names are retained. Anchoring uses the minimum over the whole input. Constants return zero. Rita() performs its own complete-case cleaning before calling transformations.

Value

The log-transformed data, retaining input dimensions and names

References

Osborne, J. W. (2002). Notes on the use of data transformations. Practical Assessment, Research and Evaluation, 9(1), 42-50.

Osborne, J. W. (2002). The Effects of Minimum Values on Data Transformations. Retrieved from https://files.eric.ed.gov/fulltext/ED463313.pdf

Examples

values <- rnorm(100)
x <- logXform(values)

Rita documentation built on Nov. 14, 2026, 1:07 a.m.

Related to logXform in Rita...