feature.outliers: outlier sample count for a features

View source: R/feature.outliers.R

feature.outliersR Documentation

outlier sample count for a features

Description

This function takes a matrix of data (samples in rows, features in columns) and counts the number of outlying samples each feature has.

Usage

feature.outliers(wdata, nsd = 5)

Arguments

wdata

the metabolite data matrix. samples in row, metabolites in columns

nsd

the number of standard deviation from the mean outliers are identified at. Default value is 5.

Value

a data frame out sample outlier counts for each feature (column) in the matrix

Examples

ex_data = sapply(1:20, function(x){ rnorm(250, 40, 5) })
s = sample(1:length(ex_data), 200)
ex_data[s] = ex_data[s] + 40
## run the function
fout = feature.outliers(ex_data)


MRCIEU/metaboprep documentation built on Jan. 28, 2023, 7:29 p.m.