version 4.2.0
The original version of this software was written in R by Andrew Clausen (clausen at econ.upenn.edu) in 2007.
Mark Reid (mark.reid at anu.edu.au) sent a patch, applied 21/2/2009.
In 2014, Andrew has passed the maintenance to Serguei Sokol (sokol at insa-toulouse.fr). Since then, the software was deeply rewritten and completed.
Main new features include:
param$theta
x[1]
x[2]
> devtools::install_github("sgsokol/Deriv")
In R session do:
> library(Deriv) > f <- function(x, n=2) x^n+sin(n*x) # user defined function to diffierentiate > (df <- Deriv(f)) # -> c(x = n * x^(n - 1) + n * cos(n * x), n = log(x) * x^n + x * cos(n * x)) > df(2, 3) # -> x n # -> 14.880511 7.465518 > Deriv(expression(f(y, 3)), "y") # -> expression(3 * y^2 + 3 * cos(3 * y)) > Deriv(~ f(y, 3), "y") # -> 3 * y^2 + 3 * cos(3 * y) > y <- 2; eval(Deriv(~ f(y, 3), "y")) # -> 14.88051
For more information and examples:
> ?Deriv
提供符号和数值微分的R语言包
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
Deriv
Symbolic differentiation
The original version of this software was written in R by Andrew Clausen (clausen at econ.upenn.edu) in 2007.
Mark Reid (mark.reid at anu.edu.au) sent a patch, applied 21/2/2009.
In 2014, Andrew has passed the maintenance to Serguei Sokol (sokol at insa-toulouse.fr). Since then, the software was deeply rewritten and completed.
Main new features include:
param$thetaorx[1],x[2]etc.Installation
Usage
In R session do:
For more information and examples: