redplot: Generate redfield plots

Description Usage Arguments See Also Examples

Description

This function generates redfield plots.These plots are a visual comparison between the drawdown of major nutrients to the corresponding terms of the redfield ratio of C:N:P. This function produces three scatter plots depitcting (1) C:N, (2) C:P, (3) N:P. All three plots include a reference line that represents the redfield ratio.

The results of this function are printed for you. Each plot is also stored in the global environment if you wish to adjust its presentation or parameters.

You may subset the redfield data if you want to differentiate between the points on the scatter plot. This is usually used to separate measurements from different stations or cruises.

Usage

1
2
redplot(C, N, P, subset = x, lwd = 2, size = 3, font.size = 23,
  lty = "solid")

Arguments

C

Drawdown of organic carbon in umol/kg.

N

Drawdown of nitrate in umol/kg.

P

Drawdown of phosphate in umol/kg.

subset

Subset the data by any variables i.e. cruise, station.

lwd

Optional graphic parameter.

size

Optional graphic parameter.

font.size

Optional graphic parameter.

lty

Optional graphic parameter.

See Also

This function relies on ggplot2 (http://ggplot2.tidyverse.org/reference/) for plotting and gridExtra (https://cran.r-project.org/web/packages/gridExtra/gridExtra.pdf) for arranging the plots. Please refer to these packages for any plot customization.

Examples

1
2
3
4
5
6
7
8
9
library(oceanchemistry)

data("greenland", package = "oceanchemistry")
head(greenland)

redplot(greenland$'Carbon drawdown',
     greenland$'Nitrate drawdown',
     greenland$'Phosphate drawdown',
     subset = greenland$Cruise)

MattForsyth/oceanchemistry documentation built on May 25, 2019, 12:23 p.m.