* using log directory 'd:/Rcompile/CRANpkg/local/4.4/Rtnmin.Rcheck' * using R Under development (unstable) (2024-03-22 r86169 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'Rtnmin/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'Rtnmin' version '2016-7.7' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'Rtnmin' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [0s] OK * checking whether the package can be loaded with stated dependencies ... [0s] OK * checking whether the package can be unloaded cleanly ... [0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s] OK * checking whether the namespace can be unloaded cleanly ... [0s] OK * checking loading without being on the library search path ... [0s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [4s] OK * checking Rd files ... [0s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking examples ... [1s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [154s] ERROR Running 'jonestn.R' [154s] Running the tests in 'tests/jonestn.R' failed. Complete output: > # test function from book by Owen Jones et al book > > # function is 2 variables to be maximized > # f(x,y)=sin(x^2/2 - y^2/4)*cos(2x-exp(y)) > > # ?? seems to have unstable parameter 1 > > 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) + } > > tufn <- function (par) { + f <- jones(par) + g <- jonesg(par) + attr(f, "gradient") <- g + attr(f, "hessian") <- NULL + f + } > require(Rtnmin) Loading required package: Rtnmin > > xx<-0.5*c(pi,pi) > atn<-tn(xx, tufn) > atn $xstar [1] 2.030697 1.401526 $f [1] -1 attr(,"gradient") [1] 1.387199e-11 6.116329e-10 $g [1] 1.387199e-11 6.116329e-10 $ierror [1] 0 $nfngr [1] 18 > tmp <- readline("continue") continue > > lo<-c(0,0) > up<-c(1.2*pi, 1.2*pi) > atnb<-tnbc(xx, tufn, lower=lo, upper=up) lmqnbc -- crout: it nf cg f |g| 0 1 0 0.05665 2.7066 1 2 1 -0.063341 2.9161 2 3 2 -0.19403 2.9881 3 4 3 -0.57225 2.4264 4 5 6 -0.62662 2.1629 5 6 8 -0.85631 2.1915 6 7 10 -0.98865 0.39198 7 8 12 -0.99998 0.0088274 8 9 14 -1 3.8592e-05 9 10 16 -1 1.4426e-05 10 11 18 -1 6.1163e-10 > atnb $xstar [1] 2.0307 1.4015 $f [1] -1 attr(,"gradient") [1] 1.3872e-11 6.1163e-10 $g [1] 1.3872e-11 6.1163e-10 $ierror [1] 0 $nfngr [1] 18 > > > proc.time() user system elapsed 0.26 0.04 0.29 * checking PDF version of manual ... [19s] OK * checking HTML version of manual ... [1s] OK * DONE Status: 1 ERROR