Description Usage Arguments Value Examples
Add sample annotation to Skyline data frame
1 | add_sample_annotation(data, annot_file)
|
data |
LipidomicsExperiment object. |
annot_file |
CSV file or a data.frame with at least 2 columns, sample names & group(s). |
LipidomicsExperiment with sample group information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | datadir <- system.file("extdata", package = "lipidr")
# all csv files
filelist <- list.files(datadir, "data.csv", full.names = TRUE)
d <- read_skyline(filelist)
# Add clinical info to existing LipidomicsExperiment object
clinical_file <- system.file("extdata", "clin.csv", package = "lipidr")
d <- add_sample_annotation(d, clinical_file)
colData(d)
d$group
# Subset samples using clinical information
# Note we are subsetting columns
d[, d$group == "QC"]
# Subset lipids using lipid annotation
# Note we are subsetting rows
d[rowData(d)$istd, ]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.