Scale Transformation functions with INVerse option, safely dealing with NaN and +-Inf

  • T_Power_Z

  • T_Log_B

  • T_Logit

T_Power_Z(x, INV = FALSE, Z)

T_Log_B(x, INV = FALSE, B = 10)

T_Logit(x, INV = FALSE, PERCENT = FALSE)

Arguments

x

metric variable

INV

=FALSE logical switch between transformation and its inverse

Z

Exponent of power transformation (T_Power_Z only)

B

=10 base of the logarithm (T_Log_B only)

PERCENT

=FALSE logical switch proportions as percent (T_Logit only)

Value

transformed metric

Examples

T_Power_Z(2,Z=1/2)
#> [1] 1.414214
T_Power_Z( T_Power_Z(2,Z=1/2), INV=TRUE,Z=1/2)
#> [1] 2
T_Log_B(100)
#> [1] 2
T_Log_B(128,2)
#> [1] 7
T_Log_B( T_Log_B(128,2), INV=TRUE) # = 1e+07
#> [1] 1e+07
T_Logit(T_Logit(0.2),INV=TRUE)
#> [1] 0.2
T_Logit(T_Logit(0.2),INV=TRUE,PERCENT=TRUE)
#> [1] 20
T_Logit(0) # NA (not -Inf because used for PlotAxis)
#> [1] NA