The function chlA
uses the trichromatic equations to convert absorbance values (wavelengths, in nm) to estimates of chlorophyll concentration using the equations from:
Jeffrey, S. W., and G. F. Humphrey. 1975. New spectrophotometric equations for determining chlorophylls a, b, c1 and c2 in higher plants, algae and natural phytoplankton. Biochem Physiol Pflanz BPP:191–194.
The function takes a data.frame
with the following values in the column names (corresponding to wavelengths in the equations in Jeffrey & Humphrey): "480", "510", "630", "647", "664", and "750." Additional arguments include extraction container volume (vol
) and, optionally, area of extration (area
, representing surface area for epiphytic algae).
The function returns the same data.frame
with columns appending for chlorophyll-a, -b, and -c, and phaeopigment concentrations.
# Create fake absorbance data
set.seed(3)
fake.chla.data = data.frame(
sample = letters[1:20],
X480nm = sample(seq(0, 0.04, 0.001), 20, replace = TRUE),
X510nm = sample(seq(0, 0.02, 0.001), 20, replace = TRUE),
X630nm = sample(seq(0, 0.015, 0.001), 20, replace = TRUE),
X647nm = sample(seq(0, 0.02, 0.001), 20, replace = TRUE),
X664nm = sample(seq(0, 0.08, 0.001), 20, replace = TRUE),
X750nm = sample(seq(0, 0.01, 0.001), 20, replace = TRUE)
)
# Run function
chlA(fake.chla.data)
# Run function with different volume
chlA(fake.chla.data, vol = 60)
# Run function but scale to area (in cm2)
chlA(fake.chla.data, area = 20)
A few questions...
Has anyone run into issues with certain absorbance values causing the error message
"Error in seq.default(0.0084, 0.008, 0.017) : wrong sign in 'by' argument" ?
This specific line in my data table will not compute, while other data tables have had no trouble:
jul23run2.chla.data = data.frame(
sample = letters[1:3],
X480nm = sample(seq(0.0036, 0.0038, 0.0287), 3, replace = TRUE),
X510nm = sample(seq(0.0024, 0.0034, 0.0146), 3, replace = TRUE),
X630nm = sample(seq(0.0084, 0.0080, 0.0170), 3, replace = TRUE), ******
X647nm = sample(seq(0.0089, 0.0090, 0.0195), 3, replace = TRUE),
X664nm = sample(seq(), 3, replace = TRUE),
X750nm = sample(seq(-0.0033, -0.0026, 0.0002), 3, replace = TRUE)
)
I have a data set that is missing the absorbance for wavelength 664nm, so I left the sequence blank since chlA formula accounts for missing wavelengths, and the computed table showed values of 1 for each sample at 664nm, so I'm wondering if that is what it is supposed to do versus computing values based on the other absorbances given.
Thanks!