back.transform: Reverse previous transformations.

Description Usage Arguments Value Examples

Description

Reverse transformations applied by the 'transform' function. Can be applied to a numeric vector of any length.

Usage

1
back.transform(x, y, type = "standard")

Arguments

x

Numeric vector of values to be backtransformed.

y

Numeric vector of original data before transformation.

type

The type of transformation to apply. Can be 'standard': with a mean 0 and sd 1; 'standard.log': with a mean 0 and sd 1 but all values > 0 to allows for future log transformation; 'centre': mean of 0.

Value

A numeric vector of back-transformed data.

Examples

1
2
3
4
5
6
7
8
#Transform data with mean 0 and sd 1.
transform_data <- transform(mtcars$disp, type = "standard")

#Back transform all data to the original format
back.transform(x = transform_data, y = mtcars$disp, type = "standard")

#Back transform single value to the original format
back.transform(x = 0, y = mtcars$disp, type = "standard")

LiamDBailey/MyFuncs documentation built on June 5, 2019, 5:10 p.m.