ch.altLogTransform: A function to log transform a variable that contains 0s...

ch.altLogTransformR Documentation

A function to log transform a variable that contains 0s and/or negatives

Description

This function log transform a variable that contains 0s and/or negatives by first tranforming x == 0 into min(x[x>0])/2 and then transforming negative numbers into (min(x[x>0])/2)/abs(x). Finally those numbers are log transformed.

Usage

ch.altLogTransform(x)

Arguments

x

a numeric combnVector.

Value

a vector of transformed numbers.

Examples

ch.altLogTransform (myX)

ccpluncw/ccpl_R_chutils documentation built on Feb. 28, 2024, 1:17 a.m.