Transformation.logNegated: Log-Transform and then Normalize and Negate 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 and negated, i.e., all of its components are logarithmically mapped into the interval [1, 0].

Usage

1

Arguments

data

the data vector

Value

a TransformedData instance corresponding to the logarithmic mapping of data into [1, 0], 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.logNegated(data)
# An object of class "TransformedData"
# Slot "transformation":
#   An object of class "Transformation"
# Slot "forward":
#   function (x)
#     ((log(x + 2) - 3.46573590279973)/-3.46573590279973)
# <environment: 0x6e9b180>
#
#   Slot "backward":
#   function (x)
#     exp(x = (x * -3.46573590279973) + 3.46573590279973) - 2
# <environment: 0x5481518>
#
#   Slot "complexity":
#   [1] 6
#
# Slot "data":
#   [1] 1.0 0.8 0.6 0.4 0.2 0.0

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