
Attaches sample metadata to a peak_table object by matching sample names.
Source: R/attach_metadata.R
attach_metadata.RdMetadata is provided as a data.frame, with one column containing sample
identifiers matching the row names of peak_table$tab.
Arguments
- peak_table
A
peak_tableobject created byget_peaktable.- metadata
A
data.frameof sample metadata.- column
Name of the column in
metadatacontaining sample identifiers. Must match the row names ofpeak_table$tab.
Examples
data(pk_tab)
path <- system.file("extdata", "Sa_metadata.csv", package = "chromatographR")
meta <- read.csv(path)
pk_tab <- attach_metadata(peak_table = pk_tab, metadata = meta, column="vial")