PomaDensity {POMA} | R Documentation

## Distribution Plot

### Description

PomaDensity() generates a density plot of not normalized and normalized MS data. This plot can help in the comparison between pre and post normalized data and in the "validation" of the normalization process.

### Usage

    PomaDensity(
      data,
      group = "samples",
      feature_name = NULL,
      legend_position = "bottom"
    )

### Arguments

`data` | A MSnSet object. First `pData` column must be the subject group/type.
`group` | Groupping factor for the plot. Options are "samples" and "features". Option "samples" (default) will create a density plot for each group and option "features" will create a density plot of each variable.
`feature_name` | A vector with the name/s of feature/s to plot. If it's NULL (default) a density plot of all variables will be created.
`legend_position` | Character indicating the legend position. Options are "none", "top", "bottom", "left", and "right".

### Value

A ggplot2 object.

### Author(s)

Pol Castellano-Escuder

### Examples

    data("st000284")

    # samples
    PomaDensity(st000284)

    # features
    PomaDensity(st000284, group = "features")

    # concrete features
    PomaDensity(st000284, group = "features",
                feature_name = c("ornithine", "orotate"))

[Package POMA version 1.2.0 Index]