symbolicD | R Documentation |
Constructs symbolic derivatives of some mathematical expressions
symbolicD(tilde, ..., .order)
tilde |
a tilde expression with the function call on the left side and the w.r.t. variables on the right side. |
... |
additional parameters, typically default values for mathematical parameters |
.order |
a number specifying the order of a derivative with respect to a single variable |
Uses the Derivs package for constructing the derivative
The .order
argument is just for convenience when programming
high-order derivatives, e.g. the 5th derivative w.r.t. one variable.
When re-assigning default values for arguments in a function
being called, as in D(dnorm(x, mean=3) ~ x)
, you will get a
numerical derivative even when the analytic form is known. To avoid
this (when possible) use D(dnorm(x) ~ x, mean=3)
a function implementing the derivative
Daniel Kaplan (kaplan@macalester.edu)
D
, numD
, antiD
, plotFun
symbolicD( a*x^2 ~ x)
symbolicD( a*x^2 ~ x&x)
symbolicD( a*sin(x)~x, .order=4)
symbolicD( a*x^2*y+b*y ~ x, a=10, b=100 )
symbolicD( dnorm(x, mn, sd) ~ x, mn=3, sd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.