View source: R/sample.sum.stats.R
sample.sum.stats | R Documentation |
This function estimates summary statistics for samples in a matrix of numeric features. This includes missingness, total peak area, and a count of the number of outlying features for a sample.
sample.sum.stats(wdata, feature_names_2_exclude = NA, outlier_udist = 5)
wdata |
the metabolite data matrix. samples in row, metabolites in columns |
feature_names_2_exclude |
a vector of feature|column names to exclude from missingness estimates |
outlier_udist |
the interquartile range unit distance from the median to call a sample an outlier at a feature. |
a data frame of summary statistics
## simulate some data set.seed(1110) ex_data = sapply(1:5, function(x){ rnorm(10, 40, 5) }) rownames(ex_data) = paste0("ind", 1:nrow(ex_data)) colnames(ex_data) = paste0("var", 1:ncol(ex_data)) ## add some missingness to the data ex_data[ sample(1:50, 10) ] = NA ## run estimate sample summary statistics sample.sum.stats(ex_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.