VectorizedTo3DArray: VectorizedTo3DArray

View source: R/VectorizedTo3DArrayFxn.R

VectorizedTo3DArrayR Documentation

VectorizedTo3DArray

Description

Converts vectorized fluorescence dataframe into a 3-D array with Ex, Em, and GRnumber as the dimensions. This results in one 2-D excitation-emmission array per sample. Requires the reshape2 package.

Usage

VectorizedTo3DArray(df, ExEm, grnum)

Arguments

df

dataframe with vectorized fluorescence data in the format from the CA WSC with one column containing both the Excitation and Emission pair, and all other columns representing a sample (e.g.,GRnumber)

ExEm

the character name of column with Excitation and Emmission wavelengths defined in this format: ###/###. For example, Excitation 250 and emmission 400 would be represented as "250/400".

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

an array with 3-D fluorescence results. The 3 dimensions are the excitation wavelength (character), the emission wavelength (character), and the sample number, e.g.,"GRnumber" (character).

Examples

df <- dfFluor
ExEm <- "Wavelength.Pairs"
grnum <- "GRnumber"
aTest <- VectorizedTo3DArray(df,ExEm,grnum)

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