staRdom error - Fluorescence data processing

I am trying to clean up my fluorescence data using staRdom package (script below), but I keep getting this error: Error in eem_raman_normalisation2(eem_list, blank = "Blank_correction") : ***
*** First argument must be of class eemlist, second argument must be 'blank' for a blank correction, a number for correction with this number or a vector with a number for each sample

This script was working perfectly in my previous runs but now it is not working anymore and I don't know what is going on.

I really appreciate your help!

cores <- detectCores(logical = FALSE)
folder <- "D:/PhD US/Research/Wetlands/Fall 2023/11082023 Aminoacids/Repetition at lower pH/FL/FL for processing"
eem_list <- eem_read(folder, recursive = TRUE, import_function = eem_csv)
absorbance_path = "D:/PhD US/Research/Wetlands/Fall 2023/11082023 Aminoacids/Repetition at lower pH/UV/Absorbance for processing"
absorbance <- absorbance_read(absorbance_path, cores = cores)
problem <- eem_checkdata(eem_list,absorbance,error=FALSE)
absorbance <- abs_blcor(absorbance,wlrange = c(680,700))
ex_range <- c(210, 300)
em_range <- c(230,350 )
eem_list <- eem_range(eem_list, ex_range, em_range)
eem_list <- eem_extend2largest(eem_list, interpolation = 20, extend = FALSE, cores = cores, resolution = 4)
eem_list <- eem_ife_correction(eem_list,absorbance, cuvl = 1)
eem_list <- eem_remove_blank(eem_list)
eem_list <- eem_raman_normalisation2(eem_list, blank = "Blank_correction")
eem_list <- eem_extract(eem_list, c("nano", "miliq", "milliq", "mq", "Blank"),ignore_case = TRUE)
absorbance <- dplyr::select(absorbance, -matches("nano|miliq|milliq|mq|blank", = TRUE))
remove_scatter <- c(TRUE, TRUE, TRUE, TRUE)
remove_scatter_width <- c(50,50,50,50)
eem_list <- eem_rem_scat(eem_list, remove_scatter = remove_scatter, remove_scatter_width = remove_scatter_width)

eem_list <- eem_interp(eem_list, cores = cores, type = 1, extend = FALSE)
eem_overview_plot(eem_list, spp=6, contour = TRUE)

This is the line throwing the error. To see why,

  • First, confirm that eem_list is of class emmlist
  • Second, confirm that Blank_correction is a permissible argument


Possible values for blank:

"blank": normalisation is done with a blank sample. Please refer to eem_raman_normalisation.

numeric: normalisation is done with one value for all samples.

data frame: normalisation is done with different values for different samples. Values are taken from a data.frame with sample names as rownames and one column containing the raman area values.

Blank_correction is given to eem_raman_normalisation2() as a character string, which is none of these.

Rob McCool, one of the team behind Netscape's web server, which eventually became Apache, had as a tagline It was working ten minutes ago, I swear. And it always drives me nuts when it happens to me between repo commits and I have no way to prove to myself that I haven't changed anything. Turns out that I almost always have changed something. When it happens right after ugrading a package, I jump through hoops trying to find how my code was victimized. Breaking changes, however, are much less common than needed to excuse my overlooking my own changes.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.