trans {rexposome} | R Documentation

## Function to apply a transformation to the exposures of an ExposomeSet

### Description

The exposures in an ExposomeSet can be transformed using this function. `transform` apples a function `fun` to the selected exposures.

### Usage

    trans(object, fun, select, by.exposure = FALSE, ...)

### Arguments

`object` | `ExposomeSet` which exposures will be transformed.
`fun` | Function to be applied on the exposures.
`select` | If not set, receive the name of all exposures. It can takes a character vector to select specific exposures.
`by.exposure` | (default `FALSE`) If `TRUE` applies `fun` to each exposure (given as a vector ). If `FALSE` the matrix of exposures is fiven to `fun`.
`...` | Argument given to `fun`.

### Value

A new `ExposomeSet` with selected exposures transformed with `fun`.

### See Also

highAndLow to transform the continuous exposures to levelled factors, standardize to standardize by normal or robust methods the exposures

### Examples

    data("exposome")
    exp.t <- trans(expo, fun = log, select = "ldde_lip")

[Package rexposome version 1.14.1 Index]