parseTrans: Parse Transformation Information

View source: R/trans_utils.R

parseTransR Documentation

Parse Transformation Information

Description

Helper to parse transformation parameter.

Usage

parseTrans(string)

Arguments

string

character string describing transformation used and its parameters, if any.

Details

-If string is "P" no transformation will be applied.
-If string is of length 1 and coercible to a numeric, smoothLinLog will be applied with 'hyper' parameter set with as.numeric(string) value.
-Otherwise, string will be split with "|", 1st element will be considered as function to call and all other elements will be passed to this function after being coerced to numeric in the order they are provided with the exception of 1st one; if coercion results in NA, the argument will be skipped.

Value

a list with 3 members:
-what, the transformation function,
-args, he parameters to pass to this function (with the exception of the 1st one),
-trans, the transformation instruction coerced to character.


IFC documentation built on Sept. 14, 2023, 1:08 a.m.