PomaOutliers: Remove and Analyze Outliers

Description Usage Arguments Value Author(s) Examples

View source: R/PomaOutliers.R

Description

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

Usage

1
2
3
4
5
6
7
8
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data("st000336")

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

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

POMA documentation built on Nov. 8, 2020, 6:26 p.m.