Skip to contents

Calculates commonly used absorbance and fluorescence optical indices from eemlist and abslist objects using functions from the eemR and staRdom packages. Can incorporate sample metadata if provided.

Usage

eemR_indices(eemlist, abslist, cuvle = 1, qaqc_dir = NA)

Arguments

eemlist

An eemlist object.

abslist

An abslist object.

cuvle

Cuvette (path) length in cm.

qaqc_dir

File path to the QAQC files generated with create_mdl() and create_std(). Default is NA, which results in NO QAQC CHECKS.

Value

A list with two elements:

  • eem_index: a data.frame of all fluorescence indices. Each row corresponds to a single index for a sample.

  • abs_index: a data.frame of all absorbance indices. Each row corresponds to a single index for a sample.

Each data.frame contains the following columns:

  • sample_id: sample identifier for the sample (if provided, otherwise uses sample: the sample's file name)

  • sample_name: sample name or description (if provided, otherwise uses sample: the sample's file name)

  • index: name of the index

  • value: calculated value of the index

Details

Absorbance indices (a254, a300, E2_E3, E4_E6, S275_295, S350_400, S300_700, SR) are calculated using staRdom::abs_parms().

Fluorescence indices are calculated using the following eemR functions:

Examples

indices <- eemR_indices(
  eemlist = example_processed_eems,
  abslist = example_processed_abs,
  qaqc_dir = system.file("extdata", package = "eemanalyzeR")
)

# View fluorescence indices
head(indices$eem_index)
#>          sample_id    sample_name index             value
#> 1     ExampleBlank Sample Blank 1     b            DATA01
#> 2    ExampleTeaStd  PreTea 1% SRM     b            DATA01
#> 3    ExampleSample Example Sample     b            DATA01
#> 4 ManualExampleTea     1% SRM tea     b            DATA01
#> 5     ExampleBlank Sample Blank 1     t             MDL01
#> 6    ExampleTeaStd  PreTea 1% SRM     t 0.589498543201252

# View absorbance indices
head(indices$abs_index)
#>          sample_id    sample_name index            value
#> 1     ExampleBlank Sample Blank 1  a254            MDL01
#> 2    ExampleTeaStd  PreTea 1% SRM  a254 37.5817130707345
#> 3    ExampleSample Example Sample  a254 18.5704030241273
#> 4 ManualExampleTea     1% SRM tea  a254 69.2896785319941
#> 5     ExampleBlank Sample Blank 1  a300            MDL01
#> 6    ExampleTeaStd  PreTea 1% SRM  a300 20.2099169663529