plot_pah: plot_pah

Description Usage Arguments

View source: R/plot_pah.R

Description

Create a bar plot of PAH concentrations. The function allows you to group the data by one or more variables, and decide which grouping variables will determine order or color.

Usage

1
2
3
4
plot_pah(pah_dat, conc_column = "Value", sample_id_column = "Sample",
  compound_column = "Parameter", compound_plot = "Total PAH",
  color_column = NA, group_column = NA, order_column = NA,
  conc_units = "ppb", thresholds = TRUE)

Arguments

pah_dat

dataframe with PAH concentrations. It is recommended that entire samples with censored observations (e.g., below detection limit) are removed from this data frame prior to calculating the difference between source and samples. This function assumes these samples have already been removed.

conc_column

column that contains PAH concentrations

sample_id_column

column name that contains unique sample id

compound_column

column name that contains PAH compound names. This can also include other chemicals, or sums of chemicals.

compound_plot

a vector of strings identifying which compounds from compound_column to include in the plot. If more than one compound is given, the plot will be faceted by compound.

color_column

a column with group variable by which to color code bars

group_column

a column by which to group and order the bars.

order_column

a column by which to order bars within groups. If left NA, this will default to the conc_column so bars are ordered low to high within groups or across all bars if no groups are given.

conc_units

character string, units for PAH concentration that will be used in labels on plots

thresholds

logical, whether to include the EPA 16 priority compound thresholds via a horizontal line. This is only appriopriate if the values being plotted are the EPA priority sum concentration.


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