plotMeanSd: Plot row standard deviations versus row means (modified from...

Description Usage Arguments Details Value Examples

View source: R/microVS.R

Description

Plot row standard deviations versus row means of a data matrix.

Usage

1
2
3
4
5
6
7
plotMeanSd(x, 
           ranks = TRUE,
           xlab  = ifelse(ranks, "Rank of means (ascending order)", "mean"),
           ylab  = "Standard deviation",
           pch   = ".",
           plot  = TRUE,
           ...)

Arguments

x

An object of class matrix

ranks

Logical, indicating whether the x-axis (means) should be plotted on the original scale (FALSE) or on the rank scale (TRUE). The latter distributes the data more evenly along the x-axis and allows a better visual assessment of the standard deviation as a function of the mean.

xlab

Character, label for the x-axis.

ylab

Character, label for the y-axis.

pch

Plot symbol.

plot

Logical. If TRUE (default), a plot is produced. Calling the function with plot=FALSE can be useful if only its return value is of interest.

...

Further arguments that get passed to plot.default.

Details

Standard deviation and mean are calculated row-wise from the expression matrix (in) x. The scatterplot of these versus each other allows to visually verify whether there is a dependence of the standard deviation (or variance) on the mean. The red dots depict the running median estimator (window-width 10%). If there is no variance-mean dependence, then the line formed by the red dots should be approximately horizontal.

Value

A named list with four components: its elements px and py are the x- and y-coordinates of the individual data points in the plot; its first and second element are the x-coordinates and values of the running median estimator (the red dots in the plot). Depending on the value of plot, the method can also have a side effect, which is to create a plot on the active graphics device.

Examples

1
2
3
4
  library(vsn)
  data(kidney)
  kidney.t = microVS(exprs(kidney))
  plotMeanSd(kidney.t)

azadcse/flowVS documentation built on Dec. 19, 2021, 6:37 a.m.