twDiffTS

Share:

Description

Approximation of the derivative dy/dx

Usage

1
twDiffTS(y, x, na.rm = TRUE, doSort = TRUE)

Arguments

y
x
na.rm

can be set to FALSE for performance reasons

doSort

can be set to FALSE for performance reasons

Value

numeric vector of length( x[!is.na(x)] ) with two sided difference approximation (y_+1 - y_-1)/(x_+1 - x_-1) and single sided approximations at the edges

Author(s)

Thomas Wutzler

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.