plotNA-methods | R Documentation |
These methods produce plots that illustrate missing data.
is.na
returns the expression matrix of it MSnSet
argument as a matrix of logicals referring whether the corresponding
cells are NA
or not. It is generally used in conjunction with
table
and image
(see example below).
The plotNA
method produces plots that illustrate missing data.
The completeness of the full dataset or a set of proteins (ordered by
increasing NA content along the x axis) is represented.
The methods make use the ggplot2
system. An object of class
'ggplot' is returned invisibly.
signature(x = "MSnSet")
Returns the a matrix of logicals of dimensions dim(x)
specifiying if respective values are missing in the
MSnSet
's expression matrix.
signature(object = "MSnSet", pNA = "numeric")
Plots missing data for an MSnSet
instance. pNA
is a
numeric
of length 1 that specifies the percentage
of accepted missing data values per features. This value will be
highlighted with a point on the figure, illustrating the overall
percentage of NA values in the full data set and the number of
proteins retained. Default is 1/2.
Laurent Gatto
See also the filterNA
method to filter out features with
a specified proportion if missing values.
data(msnset)
exprs(msnset)[sample(prod(dim(msnset)), 120)] <- NA
head(is.na(msnset))
table(is.na(msnset))
image(msnset)
plotNA(msnset, pNA = 1/4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.