getAbs: getAbs

View source: R/AbsFxn.R

getAbsR Documentation

getAbs

Description

Retrieves individual absorbance coefficients

Usage

getAbs(dataAbs, waveCol, wavs, colSubsetString, dataSummary, grnum)

Arguments

dataAbs

dataframe with absorbance spectra results, one column per sample, and one column containing the wavelength at which an absorbance measurment is made.

waveCol

character column name to define the wavelengths for which absorbance was measured.

wavs

numeric vector with absorbance wavelengths to extract.

colSubsetString

unique characters to identify which columns have absorbance data. The default is "gr" to comply with the common naming from the CA WSC.

dataSummary

dataframe with summary absorbance and fluoresence data. This function adds columns to the end of this dataframe as additional summary data.

grnum

character column name that defines the column with sample names in the dataSummary dataframe. These names are used to merge spectral slope data into the summary dataframe.

Value

summary absorbance and fluorescence dataframe with the additional absorbance peaks extracted using getAbs

Examples

dataAbs <- dfabs
waveCol <- "wavelengths"
wavs <- c(430,530,630,730)
colSubsetString <- "gr"
dataSummary <- dfsummary
grnum <- "GRnumber"
testAbs <- getAbs(dataAbs,waveCol,wavs,
               colSubsetString,dataSummary,grnum)
# note that the new absorbance coefficients specified in wavs have been
#added to the end of dataSummary

USGS-R/USGSHydroOpt documentation built on Oct. 18, 2022, 9:50 a.m.