PomaOutliers {POMA} | R Documentation

## Remove and Analyze Outliers

### Description

This function allows users to analyze outliers by different plots and remove them from an MSnSet object.

### Usage

    PomaOutliers(
      data,
      do = "clean",
      method = "euclidean",
      type = "median",
      coef = 1.5,
      labels = FALSE
    )

### Arguments

`data` | A MSnSet object. First `pData` column must be the subject group/type.
`do` | Action to do. Options are "clean" (to remove detected outliers) and "analyze" (to analyze data outliers). Note that the output of this function will be different depending on this parameter.
`method` | Distance measure method to perform MDS. Options are "euclidean", "maximum", "manhattan", "canberra" and "minkowski". See `?dist()`.
`type` | Type of outliers analysis to perform. Options are "median" (default) and "centroid". See `vegan::betadisper`.
`coef` | This value corresponds to the classical 1.5 in Q3 + 1.5*IQR formula to detect outliers. By changing this value, the permissiveness in outlier detection will change.
`labels` | Logical indicating if sample IDs should to be plotted or not.

### Value

A MSnSet object with cleaned data or different exploratory plots for the detailed analysis of outliers (depending on "do" parameter).

### Author(s)

Pol Castellano-Escuder

### Examples

    data("st000336")

    # clean outliers
    st000336 %>%
      PomaImpute() %>%
      PomaNorm() %>%
      PomaOutliers()

    # analyze outliers
    st000336 %>%
      PomaImpute() %>%
      PomaNorm() %>%
      PomaOutliers(do = "analyze")

[Package POMA version 1.0.0 Index]