View source: R/missingness.sum.R
missingness.sum | R Documentation |
This function sumarizes sample and feature missingness in tables and in a summary plot.
missingness.sum(mydata)
mydata |
metabolite data matrix, with samples in rows and metabolite features in columns. |
a list object of length four with (1) a vector of sample missingess,(2) a vector of feature missingness ,(3) a table summarizing missingness ,(4) a list of ggplot2 plots for sample and feature histogram distribution and summary tables
ex_data = sapply(1:100, function(x){ rnorm(250, 40, 5) }) ## define the data set rownames(ex_data) = paste0("ind", 1:nrow(ex_data)) colnames(ex_data) = paste0("var", 1:ncol(ex_data)) ## add in some missingness ex_data[sample(1:length(ex_data), 500)] = NA ## Estimate missingness and generate plots ms = missingness.sum(ex_data) ## plots ggpubr::ggarrange(plotlist = ms$plotsout, ncol = 2, nrow = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.