View source: R/outlier.summary.R
outlier.summary | R Documentation |
This function plots the distribution of and identifiy outliers for every metabolite (column) in a data frame.
outlier.summary(dtst, pdf_filename = "./feature_distributions.pdf", nsd = 5)
dtst |
numeric data frame |
pdf_filename |
name of the pdf out file |
nsd |
number of SD to consider as outliers, 5 is default |
print summary figures for each column of data in the data frame to a pdf file.
## define a covariance matrix cmat = matrix(1, 4, 4 ) cmat[1,] = c(1, 0.8, 0.6, 0.2) cmat[2,] = c(0.8, 1, 0.7, 0.5) cmat[3,] = c(0.6, 0.7, 1, 0.6) cmat[4,] = c(0.2, 0.5, 0.6,1) ## simulate some correlated data (multivariable random normal) set.seed(1110) d1 = MASS::mvrnorm(n = 250, mu = c(5, 45, 25, 15), Sigma = cmat ) set.seed(1010) d2 = MASS::mvrnorm(n = 250, mu = c(5, 45, 25, 15), Sigma = cmat ) ## simulate some random data d3 = sapply(1:20, function(x){ rnorm(250, 40, 5) }) ## define the data set ex_data = cbind(d1,d2,d3) rownames(ex_data) = paste0("ind", 1:nrow(ex_data)) colnames(ex_data) = paste0("var", 1:ncol(ex_data)) ## run the function outlier.summary(ex_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.