| cderiv | R Documentation | 
Take the central derivative of numeric vectors by averaging the forward and backward differences.
cderiv(x)
| x | A numeric matrix, or a vector which will be converted to a single-column matrix. | 
A matrix or vector the same dimensions as x, with the
derivative taken for each column of x. The first and last rows may
need to be deleted, depending on the application.
x <- cderiv(seq(5))
stopifnot(all(x == c(.5, 1, 1, 1, .5)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.