transformations: Transformations

Description Usage Arguments Examples

Description

Various scale transformation functions. These will keep the sign of x (and are basically sign(x) * FUN(abs(x)))

Usage

1
2
3
4
5
6
7

Arguments

x

the data vector to transform

exp

the exponent for the transoformation x^exp

base

the logarithm base

FUN

the transformation function, defined on the range [0, +Inf]

...

additional arguments for FUN

Examples

1
2
3
4
5
6
7
8
curve(sqrt_transform(x), -2, 2, n = 1000)
curve(power_transform(x), -2, 2, n = 1000)
curve(power_transform(x, 3), -2, 2, n = 1000)
curve(log_transform(x), -2, 2, n = 1000)
curve(log_transform(x, 10), -2, 2, n = 1000)
curve(FUN_transform(x, FUN = function(x) x + 2 * x^3), -2, 2)
curve(FUN_transform(x, FUN = function(x, a, b) x + a * x^b, a = 2, b = 3), -2, 2)
curve(FUN_transform(x, FUN = function(x, a, b) x + a * x^b, a = 4, b = 5), -2, 2)

xrobin/xavamess documentation built on June 15, 2021, 3:46 a.m.