diffplot {canprot}R Documentation

Plot Compositional Differences

Description

Make a plot showing differences and p-values.

Usage

  diffplot(comptab, col="black")

Arguments

comptab

list or data frame, summary of comparisons generated by ZC_nH2O

col

the color(s) for points

Details

A plot is created with points showing the differences in means of two compositional metrics: average oxidation state of carbon (ZC) and water demand per residue in formation reactions from basis species (n̄H2O).

For plotting the points, if either the absolute value of (CLES in percent - 50) is greater than 10 or p-value is less than 0.05, it is considered a “significant” difference. The point symbol is an open circle if neither (ZC) nor (n̄H2O) has a significant difference, a filled circle if one of the metrics has a significant difference, and a filled square if both metrics have a significant difference. The colors of the points are controlled by col (recycled to be equal to the number of comparisons in comptab).

For each metric that has a significant difference, a line is drawn from its point that is normal to and ends at the corresponding axis line. The line is solid if both the effect size and p-value meet the criteria above, or dashed line if only one of effect size or p-value meets the criterion.

Examples

data(canprot)
comptab <- lapply(c("JKMF10", "WDO+15_C.N"), function(dataset) {
  pdat <- get_pdat(dataset)
  ZC_nH2O(pdat, plot.it=FALSE)
})
diffplot(comptab)

[Package canprot version 0.0.2 Index]