Transformation.log: Log-Transform and then Normalize a Data Vector

Description Usage Arguments Value See Also Examples

View source: R/logScale.R

Description

A data vector is logarithmically scaled and then normalized, i.e., all of its components are logarithmically mapped into the interval [0, 1].

Usage

1

Arguments

data

the data vector

Value

a TransformedData instance corresponding to the logarithmic mapping of data into [0, 1], or NULL if such a mapping is not possible, e.g., if data contained non-finite values

See Also

Transformation.apply

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data <- c(-1, 0, 2, 6, 14, 30)
Transformation.log(data)
# An object of class "TransformedData"
# Slot "transformation":
# An object of class "Transformation"
# Slot "forward":
# function (x)
# log(x + 2) * 0.288539008177793
# <environment: 0x3b5cc18>
#
# Slot "backward":
# function (x)
# exp(x = x * 3.46573590279973) - 2
# <environment: 0x3c19460>
#
# Slot "complexity":
#   [1] 5
#
# Slot "data":
# [1] 0.0 0.2 0.4 0.6 0.8 1.0

thomasWeise/dataTransformeR documentation built on May 14, 2019, 8:03 a.m.