Last updated on 2024-03-29 00:50:55 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 2019-12.4 | 2.96 | 30.74 | 33.70 | NOTE | |
r-devel-linux-x86_64-debian-gcc | 2019-12.4 | 2.69 | 23.48 | 26.17 | NOTE | |
r-devel-linux-x86_64-fedora-clang | 2019-12.4 | 42.19 | NOTE | |||
r-devel-linux-x86_64-fedora-gcc | 2019-12.4 | 40.99 | NOTE | |||
r-devel-windows-x86_64 | 2019-12.4 | 4.00 | 373.00 | 377.00 | ERROR | |
r-patched-linux-x86_64 | 2019-12.4 | 4.42 | 30.26 | 34.68 | NOTE | |
r-release-linux-x86_64 | 2019-12.4 | 3.27 | 29.00 | 32.27 | OK | |
r-release-macos-arm64 | 2019-12.4 | 21.00 | OK | |||
r-release-macos-x86_64 | 2019-12.4 | 25.00 | OK | |||
r-release-windows-x86_64 | 2019-12.4 | 5.00 | 48.00 | 53.00 | OK | |
r-oldrel-macos-arm64 | 2019-12.4 | 21.00 | OK | |||
r-oldrel-windows-x86_64 | 2019-12.4 | 8.00 | 53.00 | 61.00 | OK |
Version: 2019-12.4
Check: Rd files
Result: NOTE
checkRd: (-1) fnchk.Rd:40-41: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) fnchk.Rd:43: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) fnchk.Rd:45: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) fnchk.Rd:47: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) fnchk.Rd:49: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) fnchk.Rd:51: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) fnchk.Rd:53: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) fnchk.Rd:55: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) fnchk.Rd:57: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgen.Rd:51: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgen.Rd:52: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgen.Rd:53: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgen.Rd:54-55: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgen.Rd:56-57: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgenb.Rd:58: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgenb.Rd:59: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgenb.Rd:60: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgenb.Rd:61-62: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) gHgenb.Rd:63: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) hesschk.Rd:53: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) hesschk.Rd:54-55: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) hesschk.Rd:56: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) hesschk.Rd:57: Lost braces in \itemize; \value handles \item{}{} directly
checkRd: (-1) hesschk.Rd:58: Lost braces in \itemize; \value handles \item{}{} directly
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-patched-linux-x86_64
Version: 2019-12.4
Check: tests
Result: ERROR
Running 'tfnchk.R' [168s]
Running 'tgrchk.R' [162s]
Running 'tkktc.R' [0s]
Running the tests in 'tests/tfnchk.R' failed.
Complete output:
> require(optextras)
Loading required package: optextras
> cat("Show how fnchk works\n")
Show how fnchk works
>
>
>
> # Want to illustrate each case.
> # Ben Bolker idea for a function that is NOT scalar
>
> benbad<-function(x, y){
+ # y may be provided with different structures
+ f<-(x-y)^2
+ } # very simple, but ...
>
> y<-1:10
> x<-c(1)
> cat("test benbad() with y=1:10, x=c(1)\n")
test benbad() with y=1:10, x=c(1)
> fc01<-fnchk(x, benbad, trace=1, y)
Function value at supplied parameters = [1] 0 1 4 9 16 25 36 49 64 81
num [1:10] 0 1 4 9 16 25 36 49 64 81
NULL
[1] TRUE
Function evaluation returns a vector not a scalar
Function evaluation returned non-numeric value
Function evaluation returned Inf or NA (non-computable)
Function at given point= NA
> print(fc01)
$fval
[1] NA
$infeasible
[1] TRUE
$excode
[1] -1
$msg
[1] "Function evaluation returned Inf or NA (non-computable)"
>
> y<-as.vector(y)
> cat("test benbad() with y=as.vector(1:10), x=c(1)\n")
test benbad() with y=as.vector(1:10), x=c(1)
> fc02<-fnchk(x, benbad, trace=1, y)
Function value at supplied parameters = [1] 0 1 4 9 16 25 36 49 64 81
num [1:10] 0 1 4 9 16 25 36 49 64 81
NULL
[1] TRUE
Function evaluation returns a vector not a scalar
Function evaluation returned non-numeric value
Function evaluation returned Inf or NA (non-computable)
Function at given point= NA
> print(fc02)
$fval
[1] NA
$infeasible
[1] TRUE
$excode
[1] -1
$msg
[1] "Function evaluation returned Inf or NA (non-computable)"
>
> y<-as.matrix(y)
> cat("test benbad() with y=as.matrix(1:10), x=c(1)\n")
test benbad() with y=as.matrix(1:10), x=c(1)
> fc03<-fnchk(x, benbad, trace=1, y)
Function value at supplied parameters = [,1]
[1,] 0
[2,] 1
[3,] 4
[4,] 9
[5,] 16
[6,] 25
[7,] 36
[8,] 49
[9,] 64
[10,] 81
num [1:10, 1] 0 1 4 9 16 25 36 49 64 81
NULL
[1] FALSE
Function evaluation returns a matrix list not a scalar
Function evaluation returned non-numeric value
Function evaluation returned Inf or NA (non-computable)
Function at given point= NA
> print(fc03)
$fval
[1] NA
$infeasible
[1] TRUE
$excode
[1] -1
$msg
[1] "Function evaluation returned Inf or NA (non-computable)"
>
> y<-as.array(y)
> cat("test benbad() with y=as.array(1:10), x=c(1)\n")
test benbad() with y=as.array(1:10), x=c(1)
> fc04<-fnchk(x, benbad, trace=1, y)
Function value at supplied parameters = [,1]
[1,] 0
[2,] 1
[3,] 4
[4,] 9
[5,] 16
[6,] 25
[7,] 36
[8,] 49
[9,] 64
[10,] 81
num [1:10, 1] 0 1 4 9 16 25 36 49 64 81
NULL
[1] FALSE
Function evaluation returns a matrix list not a scalar
Function evaluation returned non-numeric value
Function evaluation returned Inf or NA (non-computable)
Function at given point= NA
> print(fc04)
$fval
[1] NA
$infeasible
[1] TRUE
$excode
[1] -1
$msg
[1] "Function evaluation returned Inf or NA (non-computable)"
>
> y<-"This is a string"
> cat("test benbad() with y a string, x=c(1)\n")
test benbad() with y a string, x=c(1)
> fc05<-fnchk(x, benbad, trace=1, y)
Error in x - y : non-numeric argument to binary operator
Function value at supplied parameters =[1] NA
attr(,"inadmissible")
[1] TRUE
logi NA
- attr(*, "inadmissible")= logi TRUE
NULL
[1] FALSE
Function evaluation returns INADMISSIBLE
Function evaluation returned non-numeric value
Function evaluation returned Inf or NA (non-computable)
Function at given point= NA
> print(fc05)
$fval
[1] NA
$infeasible
[1] TRUE
$excode
[1] -1
$msg
[1] "Function evaluation returned Inf or NA (non-computable)"
>
> fr <- function(x) { ## Rosenbrock Banana function
+ x1 <- x[1]
+ x2 <- x[2]
+ 100 * (x2 - x1 * x1)^2 + (1 - x1)^2
+ }
> xtrad<-c(-1.2,1)
> ros1<-fnchk(xtrad, fr, trace=1)
Function value at supplied parameters =[1] 24.2
num 24.2
NULL
[1] TRUE
Function at given point= 24.2
> print(ros1)
$fval
[1] 24.2
$infeasible
[1] FALSE
$excode
[1] 0
$msg
[1] "fnchk OK"
>
>
> proc.time()
user system elapsed
0.21 0.04 0.25
Running the tests in 'tests/tgrchk.R' failed.
Complete output:
> cat("Show how grchk works\n")
Show how grchk works
> require(optextras)
Loading required package: optextras
> require(numDeriv)
Loading required package: numDeriv
>
> jones<-function(xx){
+ x<-xx[1]
+ y<-xx[2]
+ ff<-sin(x*x/2 - y*y/4)*cos(2*x-exp(y))
+ ff<- -ff
+ }
>
> jonesg <- function(xx) {
+ x<-xx[1]
+ y<-xx[2]
+ gx <- cos(x * x/2 - y * y/4) * ((x + x)/2) * cos(2 * x - exp(y)) -
+ sin(x * x/2 - y * y/4) * (sin(2 * x - exp(y)) * 2)
+ gy <- sin(x * x/2 - y * y/4) * (sin(2 * x - exp(y)) * exp(y)) - cos(x *
+ x/2 - y * y/4) * ((y + y)/4) * cos(2 * x - exp(y))
+ gg <- - c(gx, gy)
+ }
>
> xx <- c(1, 2)
>
> gcans <- grchk(xx, jones, jonesg, trace=1, testtol=(.Machine$double.eps)^(1/3))
gradient test tolerance = 6.055454e-06 fval= 0.3002153
compare to max(abs(gn-ga))/(1+abs(fval)) = 1.312852e-11
> gcans
[1] TRUE
attr(,"ga")
[1] -1.297122 3.311502
attr(,"gn")
[1] -1.297122 3.311502
>
>
>
> proc.time()
user system elapsed
0.26 0.06 0.32
Flavor: r-devel-windows-x86_64