get_group {MetProc} | R Documentation |
Retrieve Index of Biological Samples and Pooled Plasma Samples
Description
Takes a metabolomics data matrix and retrieves the column indices of biological samples and pooled plasma samples. Columns must be ordered by injection order and each column ID should have a unique prefix designating the particular type of sample it is. For example, “PPP”' to designate pooled plasma samples and “X” to designate biological samples. Generally if data is read into R using the read.met
function, columns will be labeled appropriately.
Usage
get_group(df, ppkey = "PPP", sidkey = "X")
Arguments
df |
The metabolomics dataset, ideally read from the |
ppkey |
The unique prefix of pooled plasma samples. Default is |
sidkey |
The unique prefix of biological samples. Default is |
Value
A list of length 2 with the following keys:
pp |
A vector with column indices of pooled plasma |
sid |
A vector with column indices of samples |
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')