df_xfm: Transform a numeric data frame or matrix using the...

View source: R/df_Xfm.R

df_xfmR Documentation

Transform a numeric data frame or matrix using the Yeo-Johnson algorithm

Description

Returns a data frame, along with many supplementary attributes (e.g., correlations, transformation parameters, simulate from correlation matrix).

Usage

df_xfm(x, keepMedian = T, keepMAD = T)

Arguments

x

Numeric data frame or matrix

keepMedian

Should the result be shifted so that it has the same median as the input vector?

keepMAD

Should the result be scaled so that it has the same dispersion (median absolute deviation) as the input vector?

Examples

x <- data.frame(w = 'char',x=rnorm(20),y=rgamma(20,3,2),z=c(rnorm(19,3,3),NA))
x_transformed <- df_xfm(x)
head(x_transformed)
attributes(x_transformed)


akcochrane/ACmisc documentation built on Nov. 24, 2024, 11:22 a.m.