histogramPlot: Plot histogram of correlations.

Description Usage Arguments Details Value Author(s) Examples

Description

histogramPlot plots histograms of correlation values in expression data and its reference.

Usage

1
2
histogramPlot(X, Y, legend, breaks = 40, title, col.X = "red",
  col.Y = "black", line = NULL)

Arguments

X

A matrix or a list of matrices of estimated gene-gene correlations.

Y

A matrix of reference gene-gene correlations (i.e. known underlying correlation structure).

legend

A vector of character strings describing the data contained in X and Y.

breaks

one of:

  • a vector giving the breakpoints between histogram cells,

  • a function to compute the vector of breakpoints,

  • a single number giving the number of cells for the histogram,

  • a character string naming an algorithm to compute the number of cells (see ‘Details’),

  • a function to compute the number of cells.

In the last three cases the number is a suggestion only; the breakpoints will be set to pretty values. If breaks is a function, the x vector is supplied to it as the only argument.

title

A character string describing title.

col.X

A vector or character string defining the color/colors associated with the data contained in X.

col.Y

The color associated with the data in Y.

line

A vector giving the line type.

Details

The default for breaks is "Sturges". Other names for which algorithms are supplied are "Scott" and "FD" / "Freedman-Diaconis" Case is ignored and partial matching is used. Alternatively, a function can be supplied which will compute the intended number of breaks or the actual breakpoints as a function of x.

Value

histogramPlot returns a plot.

Author(s)

Saskia Freytag

Examples

1
2
3
4
5
6
7
8
Y<-simulateGEdata(500, 500, 10, 2, 5, g=NULL, Sigma.eps=0.1, 250, 100, check.input=FALSE)
Y.hat<-RUVNaiveRidge(Y, center=TRUE, nc_index=251:500, 0, 10, check.input=FALSE)
Y.hat.cor<-cor(Y.hat[,1:100])
try(dev.off(), silent=TRUE)
histogramPlot(Y.hat.cor, Y$Sigma[1:100,1:100], title="Simulated data", legend=c("RUV", "Truth"))
try(dev.off(), silent=TRUE)
histogramPlot(list(Y.hat.cor, cor(Y$Y[,1:100])), Y$Sigma[1:100,1:100],
title="Simulated data", col.Y="black", legend=c("RUV", "Raw", "Truth"))

PeteHaitch/RUVcorr documentation built on May 8, 2019, 1:31 a.m.