* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/bioset.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 ‘bioset/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘bioset’ version ‘0.2.3’ * package encoding: UTF-8 * 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 ‘bioset’ can be installed ... [4s/10s] OK * checking package directory ... OK * checking ‘build’ 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 ... [6s/15s] OK * 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 LazyData ... NOTE 'LazyData' is specified without a 'data' directory * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... [4s/12s] ERROR Running examples in ‘bioset-Ex.R’ failed The error most likely occurred in: > ### Name: calc_factor_conc > ### Title: Get a factor to convert concentrations. > ### Aliases: calc_factor_conc > > ### ** Examples > > library("dplyr") Attaching package: ‘dplyr’ The following objects are masked from ‘package:stats’: filter, lag The following objects are masked from ‘package:base’: intersect, setdiff, setequal, union > > # generate test data > data <- tibble( + sample = c("A", "B", "C"), + conc = c(4.5, 2.3, 5.1), # concentration in g / l + ) > > fctr_ng_ml <- calc_factor_conc(from = "g/l", to = "ng/ml") ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- bioset --- call from context --- is_recognised_unit(parts) --- call from argument --- is.character(x) && nchar(x) > 0 --- R stacktrace --- where 1: is_recognised_unit(parts) where 2: FALSE %in% is_recognised_unit(parts) where 3: canonicalise_units(from) where 4: calc_factor_conc(from = "g/l", to = "ng/ml") --- value of length: 2 type: logical --- [1] TRUE TRUE --- function from context --- function (x) { if (is.character(x) && nchar(x) > 0) { return(x %in% recognised_units) } return(FALSE) } --- function search by body --- Function is_recognised_unit in namespace bioset has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * 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(bioset) > > test_check("bioset") ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- bioset --- call from context --- is_recognised_unit(parts) --- call from argument --- is.character(x) && nchar(x) > 0 --- R stacktrace --- where 1: is_recognised_unit(parts) where 2: FALSE %in% is_recognised_unit(parts) where 3: bioset:::canonicalise_units(" µ l / \tf g\t") where 4: eval_bare(expr, quo_get_env(quo)) where 5: quasi_label(enquo(object), label, arg = "object") where 6 at test_calc.R#6: expect_equal(bioset:::canonicalise_units(" µ l / \tf g\t"), "µl/fg") 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 test_calc.R#4: test_that("canonicalise_units works as expected", { expect_equal(bioset:::canonicalise_units(" µ l "), "µl") expect_equal(bioset:::canonicalise_units(" µ l / \tf g\t"), "µl/fg") expect_error(bioset:::canonicalise_units("%")) expect_error(bioset:::canonicalise_units("")) expect_error(bioset:::canonicalise_units(" \t ")) expect_error(bioset:::canonicalise_units(" \t / \t")) expect_error(bioset:::canonicalise_units(" %\t / \t")) expect_error(bioset:::canonicalise_units(" %")) expect_warning(bioset:::canonicalise_units("% w / v")) expect_warning(bioset:::canonicalise_units("%w/v")) expect_equal(bioset:::canonicalise_units("v/v"), "l/l") expect_equal(bioset:::canonicalise_units("w/w"), "g/g") expect_equal(bioset:::canonicalise_units("%v/v"), "cl/l") expect_equal(bioset:::canonicalise_units("%w/w"), "cg/g") expect_equal(bioset:::canonicalise_units("µM"), "µmol/l") expect_equal(bioset:::canonicalise_units("M"), "mol/l") }) 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("bioset") --- value of length: 2 type: logical --- [1] TRUE TRUE --- function from context --- function (x) { if (is.character(x) && nchar(x) > 0) { return(x %in% recognised_units) } return(FALSE) } --- function search by body --- Function is_recognised_unit in namespace bioset has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking re-building of vignette outputs ... [6s/17s] OK * 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: 2 ERRORs, 1 NOTE See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/bioset.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 2:16.46, 43.97 + 7.13