First function to use on discrete time-series. Returns a vector giving the position of every zero crossing within the time-series.
Arguments
- time
numeric Vector of times from the time-series (x-axis).
- var
numeric Vector of observations from the time-series (y-axis).
- zero.lim
numeric Limit for multiplication, only values higher than
zero.limare kept (removes noise and prevents recording zeroes when time-series is flat.).- timeSplit
numeric Increase time-series frequency (value at t = 0 are copied from t = 1 to t = 9, etc.). 10 usually garantees accuracy.
- return_n1n2
logical If
TRUE, also return the value of the multiplication.
Details
For every time point, the numerical derivative is calculated using
diff() and each sequential time point of the numerical
derivative is multiplied. When the result is negative, the time-series
crosses zero.
References
Durand M, Matule B, Burgess AJ, Robson TM. 2021. Sunfleck properties from time series of fluctuating light. Agricultural and Forest Meteorology 308-309, 108554. doi:10.1016/j.agrformet.2021.108554
