get_missing {MetProc} | R Documentation |
Compute Missing Rates of Biological Samples and Pooled Plasma Samples
Description
Computes two missing rates per metabolite: 1. Missing rate of biological samples and 2. Missing rate of pooled plasma samples. Requires a metabolomics data matrix from read.met
function as well as the indicies of pooled plasma and biological samples from get_group
. Returns a list with the two missing rates across all metabolites
Usage
get_missing(df, ppind, sampind)
Arguments
df |
The metabolomics dataset, ideally read from the |
ppind |
The indices of the pooled plasma samples. |
sampind |
The indices of the biological samples. |
Value
A list with the missing rates of the pooled plasma samples and biological samples for all metabolites in dataframe. The keys are:
ppmiss |
The pooled plasma missing rate for each metabolite |
sampmiss |
The biological sample missing rate for each metabolite |
See Also
See MetProc-package
for examples of running the full process.
Examples
library(MetProc)
#Read metabolomics data
metdata <- read.met(system.file("extdata/sampledata.csv", package="MetProc"),
headrow=3, metidcol=1, fvalue=8, sep=",", ppkey="PPP", ippkey="BPP")
#Get groups based on samples and pooled plasma
grps <- get_group(metdata,'PPP','X')
#Get the missing rates of each category for all metabolites
missrate <- get_missing(metdata,grps[['pp']],grps[['sid']])