| barplot_samples_memi {MatrixQCvis} | R Documentation |
'barplot_samples_memi' plots the number of measured/missing features of samples as a barplot. The function will take as input the returned 'tbl' of 'samples_memi'.
barplot_samples_memi(tbl, measured = TRUE)
tbl |
'tbl' object |
measured |
'logical', should the number of measured or missing values be plotted |
'gg' object from 'ggplot2'
## create se
a <- matrix(1:100, nrow = 10, ncol = 10,
dimnames = list(1:10, paste("sample", 1:10)))
a[c(1, 5, 8), 1:5] <- NA
set.seed(1)
a <- a + rnorm(100)
cD <- data.frame(name = colnames(a), type = c(rep("1", 5), rep("2", 5)))
rD <- data.frame(spectra = rownames(a))
se <- SummarizedExperiment::SummarizedExperiment(assay = a,
rowData = rD, colData = cD)
## create the data.frame with information on number of measured/missing
## values
tbl <- samples_memi(se)
## plot number of measured values
barplot_samples_memi(tbl, measured = TRUE)
## plot number of missing values
barplot_samples_memi(tbl, measured = FALSE)