* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/james.analysis.Rcheck’ * using R Under development (unstable) (2022-04-03 r82074) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘james.analysis/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘james.analysis’ version ‘1.0.1’ * 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 ‘james.analysis’ can be installed ... 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 ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... NOTE boxplot.james: no visible global function definition for ‘mtext’ getBestSolutionValues.james : : no visible global function definition for ‘tail’ isMinimizing: no visible global function definition for ‘head’ isMinimizing: no visible global function definition for ‘tail’ mergeJAMES.james: no visible global function definition for ‘glob2rx’ plotConvergence.james : : : no visible global function definition for ‘tail’ plotConvergence.james: no visible global function definition for ‘tail’ plotConvergence.james: no visible global function definition for ‘head’ plotConvergence.james : : no visible global function definition for ‘tail’ plotConvergence.james: no visible global function definition for ‘matplot’ plotConvergence.james: no visible global function definition for ‘mtext’ summary.james: no visible global function definition for ‘sd’ summary.james: no visible global function definition for ‘median’ summary.james: no visible global function definition for ‘IQR’ Undefined global functions or variables: IQR glob2rx head matplot median mtext sd tail Consider adding importFrom("graphics", "matplot", "mtext") importFrom("stats", "IQR", "median", "sd") importFrom("utils", "glob2rx", "head", "tail") 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 LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(james.analysis) > > test_check("james.analysis") ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- james.analysis --- call from context --- readJAMES(c("a", "b")) --- call from argument --- is.null(file) || is.na(file) --- R stacktrace --- where 1: readJAMES(c("a", "b")) where 2: eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) where 3: withCallingHandlers({ code NULL }, error = function(cnd) { if (can_entrace(cnd)) { cnd <- cnd_entrace(cnd) } return_from(env, cnd) }) where 4: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), ...) where 5: quasi_capture(enquo(object), label, capture_error, entrace = TRUE) where 6 at testReadJAMES.R#16: expect_error(readJAMES(c("a", "b")), "non-empty string") where 7: eval(code, test_env) where 8: eval(code, test_env) where 9: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error) where 10: doTryCatch(return(expr), name, parentenv, handler) where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) where 13: doTryCatch(return(expr), name, parentenv, handler) where 14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) where 15: tryCatchList(expr, classes, parentenv, handlers) where 16: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { }) where 17: test_code(desc, code, env = parent.frame(), reporter = reporter) where 18 at testReadJAMES.R#12: test_that("readJAMES complains on invalid arguments", { expect_error(readJAMES(NULL), "non-empty string") expect_error(readJAMES(NA), "non-empty string") expect_error(readJAMES(""), "non-empty string") expect_error(readJAMES(c("a", "b")), "non-empty string") }) where 19: eval(code, test_env) where 20: eval(code, test_env) where 21: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error) where 22: doTryCatch(return(expr), name, parentenv, handler) where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) where 25: doTryCatch(return(expr), name, parentenv, handler) where 26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) where 27: tryCatchList(expr, classes, parentenv, handlers) where 28: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { }) where 29: test_code(NULL, exprs, env) where 30: source_file(path, child_env(env), wrap = wrap) where 31: FUN(X[[i]], ...) where 32: lapply(test_paths, test_one_file, env = env, wrap = wrap) where 33: doTryCatch(return(expr), name, parentenv, handler) where 34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 35: tryCatchList(expr, classes, parentenv, handlers) where 36: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL }) where 37: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, wrap = wrap)) where 38: test_files(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap, load_package = load_package) where 39: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap, load_package = load_package, parallel = parallel) where 40: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") where 41: test_check("james.analysis") --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- function (file) { if (is.null(file) || is.na(file) || !is.character(file) || length(file) != 1 || nchar(file) == 0) { stop("'file' should be a non-empty string") } if (!file.exists(file)) { msg <- sprintf("'file' %s does not exist", file) stop(msg) } results <- rjson::fromJSON(file = file) unexpectedStructure <- function() { msg <- sprintf("'unexpected JSON structure in file' %s", file) stop(msg) } if (!is.list(results) || length(results) == 0) { unexpectedStructure() } problem.names <- names(results) if (is.null(problem.names) || anyDuplicated(problem.names)) { unexpectedStructure() } for (n in problem.names) { if (is.na(n) || nchar(n) == 0) { unexpectedStructure() } } for (problem in results) { if (!is.list(problem) || length(problem) == 0) { unexpectedStructure() } search.names <- names(problem) if (is.null(search.names) || anyDuplicated(search.names)) { unexpectedStructure() } for (n in search.names) { if (is.na(n) || nchar(n) == 0) { unexpectedStructure() } } for (search in problem) { if (!is.list(search) || length(search) == 0) { unexpectedStructure() } for (run in search) { if (!is.list(run) || !any(length(run) == c(2, 3))) { unexpectedStructure() } run.components <- names(run) if (is.null(run.components) || anyDuplicated(run.components)) { unexpectedStructure() } for (n in run.components) { if (is.na(n) || nchar(n) == 0) { unexpectedStructure() } } if (!("times" %in% run.components) || !("values" %in% run.components) || (length(run) == 3) && !("best.solution" %in% run.components)) { unexpectedStructure() } if (length(run$times) != length(run$values)) { unexpectedStructure() } if (is.unsorted(run$times)) { unexpectedStructure() } if (is.unsorted(run$values) && is.unsorted(rev(run$values))) { unexpectedStructure() } } } } class(results) <- c("james", class(results)) return(results) } --- function search by body --- Function readJAMES in namespace james.analysis 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, 1 NOTE See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/james.analysis.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:07.28, 39.05 + 6.22