transfR: Function for Real to Real transform of Real to Positive...

View source: R/transfR.R

transfRR Documentation

Function for Real to Real transform of Real to Positive functions and its inverse transformation

Description

Compute the the desired transformation for the abs of the input and multiply the output by the sign of the input.

Usage

transfR(x, transf, inverse = FALSE, base = 2)

Arguments

x

numeric

transf

character name of the function that implements the transformation to be applied.

inverse

logical indicating if the inverse of the transformation is to be performed

base

numeric to be considered as the base of the log transformation

Value

numeric with the transformed input

Examples

transfR(-5:5, 'sqrt')
transfR(-5:5, 'log')
plot(function(x) transfR(x, 'log'), -10, 10)
plot(function(x) transfR(x, 'log', base=10),
     -10, 10, col=4, add=TRUE)
x <- -30:30/30
plot(x, transfR(transfR(x, 'log'),
     'log', inverse=TRUE))

eliaskrainski/emisc documentation built on Nov. 18, 2024, 11:02 a.m.