-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I am about to submit 'photobiology' 0.13.1 to CRAN. Functions photobiology::get_peaks() and photobiology::get_valleys() have been deprecated already in an earlier version in favour of other functions in the package: find_peaks() and find_valleys(). There are also especializations of photobiology::peaks() and photobiology::valleys() for data frames. I have designed the functions mainly for use with light emission and light absorption spectra, and tested them with such spectra. However, they are wrappers on splus2R::peaks(), a general purpose function. 'photobiology' is a large R package, with quite a few dependencies, so this may bloat unnecesarily your package and slow-down its loading.
photobiology::get_peaks() and photobiology::get_valleys() starting from the inminent release of 'photobiology' emit a message when called but otherwise work normally. Please, consider using splus2R::peaks() or the newer functions from 'photobiology' the next time you update package 'vachette', as from your code you are not making use of any significant added feature.
Your call photobiology::get_peaks(x,y,span=w)$x is equivalent to splus2R::peaks(x, span=w, strict=FALSE) as long as w is not NULL, in which case it returns x[x == max(x)] still obeying strict. For valleys peaks are searched in -x.
There is a comment in your package source asking what is the behaviour when maxima and minima are not unique. This is controlled by formal parameter 'strict'. With strict = FALSE all these values are returned, and with strict = TRUE none of them are returned.
There is no much hurry with this, unless you find the deprecation message annoying.