pah_mw_parent: pah_mw_parent

Description Usage Arguments

View source: R/pah_mw_parent.R

Description

Summarizes compound characteristics, including low versus high molecular weight and parent versus alkylated, as one line of evidence for potential sources. Samples that contain high molecular weight and parent compounds indicate a pyrogenic rather than petrogenic PAH source.

Usage

1
2
3
pah_mw_parent(compound_info, sample_column, conc_column, compound_column,
  statistic = "average", parent_compounds, alkylated_compounds,
  plot = TRUE)

Arguments

compound_info

The output dataframe from 'get_compound_info', which contains sample concentrations as well as compound-specific information, including low versus high molecular weight (column "molwt_highlow").

sample_column

string, column that contains unique sample identifier

conc_column

string, column that contains sample concentrations

compound_column

string, column that contains compound names.

statistic

string, either "sum" or "average" which will apply to molecular weight ratios. If statistic = "sum", compounds in each category (low vs. high molecular weight) are summed by sample. Because different analyses may measure a different number of chemicals or focus on different types of chemicals, these numbers are hard to interpret both within and across studies. For example, the analysis may measure many more high versus low molecular weight compounds, skewing this ratio. Alternatively, the average concentration of compounds in each category ("average") is a way to standardize the number of compounds in each category. If plot = FALSE, both statistics are calculated and exported in the first table in the list ("all_dat"), but only the chosen statistic is summarized and exported in the second table that summarizes HMW:LMW for each sample ("summarized_dat"). If plot = TRUE, only the statistic of choice is plotted. The sum is always used for the parent:alkyl calculation, assuming the user has provided only parents that have corresponding alkyls, and vice versa.

parent_compounds

A vector of all parent compounds in analysis that have associated alkylated compounds. If two alkylated compounds can not be distinguished from each other (e.g., have the same molecular weight), and therefore the parents cannot be distinguished, all possible parents should be listed. These names should reflect the exact names that are in your compound_info table.

alkylated_compounds

A vector of all alkylated compounds in the analysis that are associated with the listed parents. These names should reflect the exact names that are in your compound_info table.

plot

logical, whether the data should be exported as two dataframes within a list (FALSE) or plotted as a boxplot (TRUE).


limnoliver/pah documentation built on April 30, 2020, 2:45 p.m.