The vignette suggest you can pass a function to "filterIntensity" which is great. Though ?filterIntensity doesn't seem to have any example at the moment but I'm sure there was one before which inspired my question
I would like to filter out low_intensities, this works exactly as intended
# function to filter out intensity smaller than the 5% of max intensity
low_int <- function(x, percentage = 0.05) {
x > max(x, na.rm = TRUE) * percentage
}
filterIntensity(mySpectraObject, low_int)
Now I might want my intensity filtering to be adaptive and so passing a value to low_int without recreating the function. That is it would be nice to be able to pass additional arguments to that function ...
The vignette suggest you can pass a function to "filterIntensity" which is great. Though ?filterIntensity doesn't seem to have any example at the moment but I'm sure there was one before which inspired my question
I would like to filter out low_intensities, this works exactly as intended
Now I might want my intensity filtering to be adaptive and so passing a value to low_int without recreating the function. That is it would be nice to be able to pass additional arguments to that function ...
or
Might be too much effort, but would be useful personally