matdensity: Density plots of columns in a matrix

Description Usage Arguments Value Examples

View source: R/plots.R

Description

Plots the density of the columns of a matrix

Usage

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

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

quantro documentation built on Nov. 8, 2020, 8:28 p.m.