transform: Transform a data. Here 'transform' is used in a wider meaning...

View source: R/general_tools.R

transformR Documentation

Transform a data. Here 'transform' is used in a wider meaning including standardization and normalization This function can be used to (i) transform 'x' using the function given by 'fun' (ii) scale ‘x' using R’s 'scale' function (=standardization) (iii) normalize 'x' so that its values have a range from 0 to 1

Description

When combining (i) and (ii) or (i) and (iii) the data is first transformed then scaled/normalized Note: Combining (ii) and (iii) does not make any sense.

Usage

transform(
  x,
  fun,
  fun_inverse,
  scale = FALSE,
  normalize = FALSE,
  eps = 0.001,
  ...
)

Arguments

x

a numeric vector

fun

a function to transform x. Or character vector: at the moment only 'logap' (log(x+a)) is implemented

fun_inverse

the inverse of it

scale

boolean. shall x also be scaled? default = FALSE

normalize

boolean. shall x also be normalized? default = FALSE

...

other parameters passed 'scale' (at the moment only support 'center')


simschul/my.utils documentation built on June 29, 2023, 6:50 a.m.