Skip to content

Commit

Permalink
version 2016.8-1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Gilbert authored and cran-robot committed Jun 6, 2019
1 parent 62e8f90 commit 54dc418
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 6 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: numDeriv
Version: 2016.8-1
Version: 2016.8-1.1
Title: Accurate Numerical Derivatives
Description: Methods for calculating (usually) accurate
numerical first and second order derivatives. Accurate calculations
Expand All @@ -18,6 +18,6 @@ Author: Paul Gilbert and Ravi Varadhan
Maintainer: Paul Gilbert <[email protected]>
URL: http://optimizer.r-forge.r-project.org/
NeedsCompilation: no
Packaged: 2016-08-21 23:03:32 UTC; paul
Packaged: 2019-06-04 11:04:44 UTC; hornik
Repository: CRAN
Date/Publication: 2016-08-27 00:25:32
Date/Publication: 2019-06-06 09:51:09 UTC
7 changes: 4 additions & 3 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
2e5a3aa9875ef4bcb482939565ce88ab *DESCRIPTION
022eadf593c93a5174c7d2f0fd9a592a *DESCRIPTION
68a5918eb427271dd79f07d62fce33a7 *NAMESPACE
57f0f954f57be55d5ebca2eaa03d6894 *NEWS
30bc245893abd0960083733df3998cd1 *R/num2Deriv.R
7671b0b77de2d0d960b5382c8aa561fe *R/numDeriv.R
f560b25a853f00d6ecb718518b0b3a95 *build/vignette.rds
af67430eeb55f14116484cf8f14078a0 *build/vignette.rds
c216cb58cd7989e4db1a31e42f9976e9 *inst/doc/Guide.R
65ba7a8040ac6c9475a6ec23e9c5e3cd *inst/doc/Guide.Stex
0f547ff19f100d2202432a9b9d92f955 *inst/doc/Guide.pdf
5edf223d46876fa732fd47671492ecd8 *inst/doc/Guide.pdf
6f429cff9fd52e47bf6ff11bb78de727 *man/00.numDeriv.Intro.Rd
4a081c87cbf11c80b9f60ef0becd4056 *man/genD.Rd
b3d62c76fb5efccb959f0687b7ad378c *man/grad.Rd
Expand Down
Binary file modified build/vignette.rds
Binary file not shown.
64 changes: 64 additions & 0 deletions inst/doc/Guide.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
### R code from vignette source 'Guide.Stex'

###################################################
### code chunk number 1: Guide.Stex:6-7
###################################################
options(continue=" ")


###################################################
### code chunk number 2: Guide.Stex:13-15
###################################################
library("numDeriv")



###################################################
### code chunk number 3: Guide.Stex:24-41
###################################################
grad(sin, pi)
grad(sin, (0:10)*2*pi/10)
func0 <- function(x){ sum(sin(x)) }
grad(func0 , (0:10)*2*pi/10)

func1 <- function(x){ sin(10*x) - exp(-x) }

curve(func1,from=0,to=5)
x <- 2.04
numd1 <- grad(func1, x)
exact <- 10*cos(10*x) + exp(-x)
c(numd1, exact, (numd1 - exact)/exact)

x <- c(1:10)
numd1 <- grad(func1, x)
exact <- 10*cos(10*x) + exp(-x)
cbind(numd1, exact, (numd1 - exact)/exact)


###################################################
### code chunk number 4: Guide.Stex:46-49
###################################################
func2 <- function(x) c(sin(x), cos(x))
x <- (0:1)*2*pi
jacobian(func2, x)


###################################################
### code chunk number 5: Guide.Stex:54-60
###################################################
x <- 0.25 * pi
hessian(sin, x)

fun1e <- function(x) sum(exp(2*x))
x <- c(1, 3, 5)
hessian(fun1e, x, method.args=list(d=0.01))


###################################################
### code chunk number 6: Guide.Stex:65-68
###################################################
func <- function(x){c(x[1], x[1], x[2]^2)}
z <- genD(func, c(2,2,5))
z


Binary file modified inst/doc/Guide.pdf
Binary file not shown.

0 comments on commit 54dc418

Please sign in to comment.