Transform a trait.

Usage

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).

Description

Transform a trait.

Examples

library(plyr) library(ggplot2)
Attaching package: ‘ggplot2’ The following object is masked from ‘package:solarius’: annotate
data(dat30) dat <- mutate(dat30, inormal_trait1 = transformTrait(trait1, "inormal")) ggplot(dat, aes(trait1)) + geom_histogram()
stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

ggplot(dat, aes(inormal_trait1)) + geom_histogram()
stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.