matdensity: Density plots of columns in a matrix

View source: R/plots.R

matdensityR Documentation

Density plots of columns in a matrix

Description

Plots the density of the columns of a matrix

Usage

matdensity(
  object,
  groupFactor = NULL,
  type = "l",
  lty = 1,
  brewer.n = 8,
  brewer.name = "Dark2",
  ...
)

Arguments

object

object an object which is inherited from an eSet such as an ExpressionSet or MethylSet object. The object can also be a data frame or matrix with observations (e.g. probes or genes) on the rows and samples as the columns.

groupFactor

an optional factor variable representing which group each column in object belongs to. It is important that values in groupFactor be in the same order as the columns in object.

type

the type of lines to plot. Default type is line ("l").

lty

the line type. Default is the solid line.

brewer.n

the number of colors in the palette from the RColorBrewer package. Default is 8.

brewer.name

the name of the palette from the RColorBrewer package. Default is "Dark2".

...

other arguments that can be passed to the codematplot function.

Value

A density plot for each column in object

Examples

library(minfi)
data(flowSorted)
p <- getBeta(flowSorted, offset = 100)
pd <- pData(flowSorted)
matdensity(object = p, groupFactor = pd$CellType, xlab = "beta values",
ylab = "density")

stephaniehicks/quantro documentation built on Nov. 7, 2022, 1:42 p.m.