View source: R/normalizations.R
| squareXform | R Documentation |
This function left anchors the minimum value to 0 per the recommendations of Osborne (2002) and subsequently transforms the data by taking the square-root of each value.
squareXform(sample)
sample |
Nonempty finite numeric vector, matrix, array, or data frame without missing values. |
Computes sqrt(sample - min(sample)), including for positive input. Equivalent scaled arithmetic avoids overflow in the difference when the square root remains representable.
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. The minimum is taken over the whole input. Constants return zero.
The square-root-transformed data, retaining input dimensions and names
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
values <- rnorm(100)
x <- squareXform(values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.