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)