eem_checkdata: Check your EEM, absorption and metadata before processing

eem_checkdataR Documentation

Check your EEM, absorption and metadata before processing


The function tries to lead you to possible problems in your data.


  metadata = NULL,
  metacolumns = NULL,
  correction = FALSE,
  error = TRUE



eemlist continaing EEM data.


data.frame containing absorbance data.


optional data.frame containing metadata.


character vector of columns that are checkt for complete data sets


logical, whether EEMs should be checked for applied corrections


logical, whether a problem should cause an error or not.


The returned list contains character vectors with sample names where possible problems were found: problem (logical, whether a severe problem was found), nas (sample names with NAs in EEM data), missing_correction (correction of EEM samples was not done or not done successfully),eem_no_abs (EEM samples with no absorbance data), abs_no_eem (samples with present absorbance but no EEM data), duplse (duplicate sample names in EEM data), duplsa (duplicate sample names in absorbance data), invalid_eem (invalid EEM sample name), invalid_abs (invalid absorbance sample name), range_mismatch (wavelength ranges of EEM and absorbance data are mismatching), metadupls (duplicate sample names in metadata), metamissing (EEM samples where metadata is missing), metaadd (samples in metadata without EEM data)


writes out possible porblems to command line, additionally list with sample names where possible problems were found, see details.


folder <- system.file("extdata/EEMs", package = "staRdom") # load example data
eem_list <- eem_read(folder, recursive = TRUE, import_function = eem_csv)

abs_folder <- system.file("extdata/absorbance", package = "staRdom") # load example data
absorbance <- absorbance_read(abs_folder, cores = 2)

metatable <- system.file("extdata/metatable_dreem.csv",package = "staRdom")
meta <- read.table(metatable, header = TRUE, sep = ",", dec = ".", row.names = 1)

checked <- eem_checkdata(eem_list, absorbance, metadata = meta,
metacolumns = "dilution", error = FALSE)
# This example returns a message, that absorbance data for the
# blank samples are missing. As absorbance is supposed to be 0 over
# the whole spectrum when you measure blanks, there is no need
# to supply the data and do an inner-filter effect correction.

staRdom documentation built on July 9, 2023, 5:57 p.m.