Learn R Programming

solarius (version 0.3.0.2)

transformTrait: Transform a trait.

Description

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

See Also

availableTransforms, transformData

Examples

Run this code
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()

Run the code above in your browser using DataLab