make_chemtable: Make chemical table

View source: R/make_chemtable.R

make_chemtableR Documentation

Make chemical table

Description

Summarize information about each chemical, including retention time and frequency of occurence by groups. Prerequisite for the filter* functions.

Usage

make_chemtable(gcdata, metadata, datatype = "long")

Arguments

gcdata

peaks integrated from GC data, either in long format (peaks in rows with columns for area, match score, and retention time, as generated by 'load_longdata()') or if detailed peak information is not available, in wide format (table of peak areas with samples in rows and compounds in columns, as generated by 'make_sampletable()').

metadata

the sample metadata, in the same row order as gcdata if datatype is 'wide'

datatype

the format of gcdata, either 'long' (the default) or 'wide'

Details

Generates chemtable, a data frame of the compounds, with the following columns:

compound

compound name

RT

mean RT

RT.var

variance of RT

match

mean match

match.var

variance of match

max.floral

maximum area in floral samples

mean.floral

mean area in floral samples, including zeros

mean.nonzero.floral

mean area in floral samples, excluding zeros

median.floral

median area in floral samples, including zeros

count.X

multiple columns, number of occurrences within types and treatment groups

freq.X

multiple columns, proportion of occurrences within types and treatment groups

Value

chemtable, a data frame of the compound

Examples

data(GCMSfloral)
## Not run: chemtable <- make_chemtable(longdata, metadata)

jmpowers/bouquet documentation built on Feb. 12, 2023, 12:11 a.m.