View source: R/ecd-diff-method.R
ecd.diff | R Documentation |
This utility uses diff to get first derivative dy/dx. but it handles mpfr vector properly
ecd.diff(y, x, pad = 0)
y |
a vector of numeric or mpfr |
x |
a vector of numeric or mpfr |
pad |
integer, to manage padding so that the output vector has the same length as the input. 0 for no padding, 1 to repeat the first element, -1 to repeat the last element. |
the derivative vector
d <- ecd.diff(c(10,20,30), c(1,2,3), pad=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.