Calculate Derivative of Function Values
Applies numerical differentiation to the values in selected columns of a function value table.
## S3 method for class 'fv': deriv(expr, which = "*", ..., method=c("spline", "numeric"), kinks=NULL)
- Function values to be differentiated.
A function value table (object of class
- Character vector identifying which columns of the table
should be differentiated. Either a vector containing names
of columns, or one of the wildcard strings
- Extra arguments passed to
smooth.splineto control the differentiation algorithm, if
- Differentiation method. A character string, partially matched
- Optional vector of $x$ values where the derivative is allowed to be discontinuous.
This command performs numerical differentiation on the function values in
a function value table (object of class
The differentiation is performed either by
smooth.spline or by
a naive numerical difference algorithm.
deriv is generic. This is the
method for objects of class
Differentiation is applied to every column (or to each of the selected columns) of function values in turn, using the function argument as the $x$ coordinate and the selected column as the $y$ coordinate. The original function values are then replaced by the corresponding derivatives.
The optional argument
which specifies which of the
columns of function values in
x will be differentiated.
The default (indicated by the wildcard
is to differentiate all function values, i.e. all columns except the
function argument. Alternatively
the subset of function values that are displayed in the default plot.
which can be a character vector containing the
names of columns of
If the argument
kinks is given, it should be a numeric vector
giving a value or values of $x$ where the function is
not differentiable. Differentiation will be performed separately on
intervals between the discontinuity points.
- Another function value table (object of class
"fv") of the same format.
data(cells) G <- Gest(cells) plot(deriv.fv(G, which=".", spar=0.5))