Description Usage Arguments Value See Also Examples
Computes a kernel density per column in a dataset and makes a single plot with appropriate limits of all densities together. The graph also includes a legend by default.
1 2 3 4 5 6 | pdw(data_rscreen, wtype = "sample", n = 512, mycols = NULL,
na.rm = TRUE, mytitle = paste("Data density", wtype, "wells"),
sel.reps = scr.names(data_rscreen), rescale = FALSE,
scale.fun = c("asinh", "log2"), mytype = "solid",
myxlab = "observed values", add.leg = TRUE, myleg = NULL,
leg.side = c("right", "left"), lcex = 1, xlim = NULL)
|
data_rscreen |
typically an rscreen.object, from which the columns of the 'data_only' slot are to be made density plots of. Otherwise a numeric matrix or a data frame with only numeric columns, in which case density plots are made of their columns. In the latter case, all entries (rows) are assumed to be of type 'sample'. |
wtype |
string indicating the well type to be used. Must be a label that exists in the wtype_ann slot. |
n |
the number of knots at which the density is to be computed - see |
mycols |
colours to be assigned to the lines of the densities computed. If left empty, |
na.rm |
logical - should NAs per column be removed? Its value is passed on to the call to |
mytitle |
string containing the title to be used. |
sel.reps |
either a character vector containing labels for replicates to be used, or indices of columns from the 'data_only' slot of the data_rscreen object to be used. The default is to use all replicates in the 'data_rscreen' object. |
rescale |
logical, indicating whether or not the data is to be rescaled. Defaults to |
scale.fun |
the name of the function to be used to rescale the data. Currently the
only choices are 'asinh' for the hyperbolic-arc sine transformation, and 'log2' for the
log2 transformation. Note that the hyperbolic-arc
sine is equivalent to the logarithm for intermediate and high values, and to a linear
transformation for low values. This transformation allows for zeros, which is a useful property when
transforming count data. Ignored if 'rescale' is |
mytype |
string indicating the line type to be used. If a single value is given, it is recycled across all lines
(one for each column in mydata). If a vector is given, it is expected to be as long as the number of columns in mydata.
The default is to use solid lines for all densities. For a list of all possible line types, see graphical parameter lty
in the help file for |
myxlab |
string containing the legend to be used for the x-axis. |
add.leg |
logical. If |
myleg |
the legend text to be shown. If left empty, and add.leg is |
leg.side |
character, the side of the plot where the legend is to be placed. Defaults to 'right', with the other option being 'left'. |
lcex |
cex parameter for legend, if used. Must be numeric. |
xlim |
a numerical vector of length 2 giving the limits to be used for the x axis. If left empty, the range of values in mydata is used. |
A plot including one density for each column of values in data_rscreen, using plot limits that allow for a complete displ)ay of each density, by default.
1 2 3 4 5 6 | mydata <- cbind(replicate(5, rnorm(500)), replicate(5, rnorm(500, mean=1)))
colnames(mydata) <- paste("Data", 1:10)
data.ann <- data.frame(geneID = paste("G", 1:500), wtype = rep("sample", 500))
data.screen <- list(data_ann = data.ann, data_only = mydata)
class(data.screen) <- "rscreen.object"
pdw(data.screen, lcex = .8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.