* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/evt0.Rcheck’ * using R Under development (unstable) (2022-04-26 r82260) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘evt0/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘evt0’ version ‘1.1-3’ * 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 executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘evt0’ can be installed ... [4s/11s] 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 R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... NOTE Package in Depends field not imported from: ‘evd’ These packages need to be imported from (in the NAMESPACE file) for when this namespace is loaded but not attached. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [8s/21s] NOTE DPOT: no visible global function definition for ‘optim’ mop.rho: no visible global function definition for ‘median’ Undefined global functions or variables: median optim Consider adding importFrom("stats", "median", "optim") to your NAMESPACE file. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... 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 contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... ERROR Running examples in ‘evt0-Ex.R’ failed The error most likely occurred in: > ### Name: PORT.Hill > ### Title: Peaks over random threshold Hill estimate > ### Aliases: PORT.Hill PORT.MOP PORT.RBMOP > ### Keywords: quasi-reduced bias PORT Hill > > ### ** Examples > > # generate random samples > x = rfrechet(50000, loc = 0, scale = 1,shape = 1/0.5) > > # estimate PORT Hill > PORT.Hill(x,c(1,500,5000),0.1,"PRBMOP") ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- evt0 --- call from context --- PORT.Hill(x, c(1, 500, 5000), 0.1, "PRBMOP") --- call from argument --- any(k < 1) || any(k > n - nq - 1) || any(k == n - nq - 1) || !is.numeric(k) || k != as.integer(k) --- R stacktrace --- where 1: PORT.Hill(x, c(1, 500, 5000), 0.1, "PRBMOP") --- value of length: 3 type: logical --- [1] FALSE FALSE FALSE --- function from context --- function (x, k, q, method = c("PMOP", "PRBMOP")) { n = length(x) nq = floor(n * q) + 1 if (nq < 2) { stop("Insufficient data vector, check sample size and q.") } if (is.null(k) || any(is.na(k))) { stop("k is not specified") } if (any(k < 1) || any(k > n - nq - 1) || any(k == n - nq - 1) || !is.numeric(k) || k != as.integer(k)) { stop("k must be greater than or equal to 1 and less than exceedance sample size.") } if (!is.numeric(x)) { stop("some of the data points are not real.") } if (q < 0 || q > 1 || !is.numeric(q)) { stop("q must lie between 0 and 1.") } method = match.arg(method) if (method == "PMOP") { PORTEVI = PORT.MOP(x, k, q) } else if (method == "PRBMOP") { PORTEVI = PORT.RBMOP(x, k, q) } return(PORTEVI) } --- function search by body --- Function PORT.Hill in namespace evt0 has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 2 NOTEs See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/evt0.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:50.57, 33.57 + 5.99