Description Usage Arguments Value Examples
View source: R/preprocessing.R
Age Transforming Function
1 | transform_age(age, type = "days", to = "years")
|
age |
a numeric vector with ages |
type |
type of the age vector, allowed values are days or years. defaults to 'days' |
to |
final format of age vector. allowed values are 'years', 'days', 'pw-N', and 'lg-N', where N is any number. 'pw' means power. e.g. pw-0.5 means sqrt(age), and 'lg' means log, e.g. lg-2 means log2(age). Defaults to 'years'. |
a vector with ages in the desired scale
1 2 3 4 | agevec <- seq(1:20)
transform_age(agevec, type = 'years', to = 'days')
transform_age(agevec, type = 'years', to = 'pw-0.25')
transform_age(agevec, type = 'years', to = 'lg-10')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.