imExposomeSet {rexposome} | R Documentation

## Class imExposomeSet

### Description

Class `imExposomeSet` was designed to store the exposures obtained after a multiple imputation process done using `mice`. The `data.frame` obtained from `mice` has the particulatiry to contain the columns `.imp` and `.id` joint to phenotypes and exposures. The slots `assayData`, `featureData`, and `phenoData` are coordinated.

### Usage

    ## S4 method for signature 'imExposomeSet,ANY'
    plot(x, y, ...)

    ## S4 method for signature 'imExposomeSet'
    dim(x)

    ## S4 method for signature 'imExposomeSet'
    expos(object)

    ## S4 method for signature 'imExposomeSet'
    exposureNames(object)

    ## S4 method for signature 'imExposomeSet'
    extract(object, rid = -1, ...)

    ## S4 method for signature 'imExposomeSet'
    exwas(object, formula, filter, family, ...,
      baselevels, tef = TRUE, verbose = FALSE, warnings = TRUE)

    ## S4 method for signature 'imExposomeSet'
    familyNames(object, by.exposure = FALSE)

    ## S4 method for signature 'imExposomeSet'
    phenotypeNames(object)

    ## S4 method for signature 'imExposomeSet'
    plotFamily(x, family, group, group2,
      scatter = FALSE, na.omit = TRUE)

    ## S4 method for signature 'imExposomeSet'
    sampleNames(object)

    ## S4 method for signature 'imExposomeSet'
    x[[i]]

    ## S4 method for signature 'imExposomeSet,ANY,ANY,ANY'
    x[i, j, k, ..., drop = FALSE]

    ## S4 method for signature 'imExposomeSet'
    toES(object, rid = 1)

### Arguments

`x` | An `imExposomeSet` object.
`y` | NOT USED
`...` | Other used arguments
`object` | An object of class `imExposomeSet`
`rid` | Number of the imputation to be extracted
`formula` | Formula, not including exposures, to be tested.
`filter` | Expression to be used to filter `ExposomeSet`
`family` | Family descriving the nature of the health outcome
`baselevels` | Labeled vector with the base-level of the categorical exposures
`tef` | If set to `TRUE` the threshold for effective test is computed.
`verbose` | If set to `TRUE` it shows messages on progression.
`warnings` | If set to `TRUE` it shows warnings on progession.
`by.exposure` | If set to `TRUE` ir returns the family which each exposure belongs
`group` | Phenotype to group exposures
`group2` | NOT USED
`scatter` | If set to true it shows the samples value in the plot
`na.omit` | NOT USED
`i` | Character coresponding to selected exposures.
`j` | Character corresponding to selected sample names.
`k` | Character corresponding to selected phenotypes.
`drop` | NOT USED

### Value

An object of class `imExposomeSet`

### Methods (by generic)

- `plot`: Wrapper for `plotFamily` method.

- `dim`: Returns the number of exsures, samples and phenotypes.

- `expos`: Returns a `data.frame` with exposures.

- `exposureNames`: Method to obtain samples' names

- `extract`: Method to extract exposures for a single imputation

- `exwas`: Performs an EXposome-Wide Association Study

- `familyNames`: Getter to obtain the families's names of the family of each exposure.

- `phenotypeNames`: Getter to obtain the families's names of the family of each exposure.

- `plotFamily`: Draws a boxplot or accumulated-bar plot for each exposure in the all imputed sets.

- `sampleNames`: Method to obtain samples' names

- `[[`: Get an `ExposomeSet` with the selected imputation

- `[`: Subset an `imExposomeSet`

- `toES`: Returns an `ExposomeSet` with ethe given imputation.

### Slots

`nimputation`

  Number of imputations done with `mice`.

`assayData`

  `data.frame` containing `.imp`, `.id` and the exposures.

`featureData`

  `data.frame` containing the description of the exposures.

`phenoData`

  `data.frame` containing `.imp`, `.id` and the phenotypes.

### Note

Sample order is not guarantee

### See Also

`loadImputed` to create an `imExposomeSet` from `data.frames`

[Package rexposome version 1.6.0 Index]