transformTrait: Transform a trait.

Description Usage Arguments Value See Also Examples

View source: R/transforms.lib.R

Description

Transform a trait.

Usage

1
transformTrait(x, transform, mult = 1, ...)

Arguments

x

a numeric vector (of a trait).

transform

a character vector, the name of transformation. Possible values are returned by availableTransforms function.

mult

A numeric, the multiplicator for the transformed value of a trait. The default value is 1.

...

additional parameters passed to internal transform_trait_* functions. Possible parameters might be log.base, log.intercept ("log" transformation).

Value

A numeric vector, which contains the transformed values (of a trait).

See Also

availableTransforms, transformData

Examples

1
2
3
4
5
6
7
8
9
library(plyr)
library(ggplot2)

data(dat30)
dat <- mutate(dat30,
   inormal_trait1 = transformTrait(trait1, "inormal"))

ggplot(dat, aes(trait1)) + geom_histogram()
ggplot(dat, aes(inormal_trait1)) + geom_histogram()

solarius documentation built on May 2, 2019, 2:43 a.m.