* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/RevGadgets.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 ‘RevGadgets/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘RevGadgets’ version ‘1.0.0’ * 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 ‘RevGadgets’ can be installed ... [17s/29s] 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 ... [32s/44s] 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 examples ... [9s/14s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [16s/22s] [16s/23s] ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(RevGadgets) > > test_check("RevGadgets") | | | 0% | |========================================| 100% | | | 0% | |========================================| 100% | | | 0% | |========================================| 100% | | | 0% | |========================================| 100% ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- ggtree --- call from context --- ggpie(df, y = ~value, fill = ~type, color, alpha) --- call from argument --- missingArg(color) || is.null(color) || is.na(color) --- R stacktrace --- where 1: ggpie(df, y = ~value, fill = ~type, color, alpha) where 2: FUN(X[[i]], ...) where 3: lapply(ldf, function(df) ggpie(df, y = ~value, fill = ~type, color, alpha)) where 4: ggtree::nodepie(dat_state_start, cols = 1:(ncol(dat_state_start) - 1), color = colors, alpha = state_transparency) where 5 at test_plotAncStatesPie.R#41: plotAncStatesPie(t = dec_example, pie_colors = colors, tip_labels_size = 2, cladogenetic = TRUE, tip_labels_offset = 0.01, timeline = F, node_pie_size = 0.5, tip_pie_size = 0.3) where 6: eval(code, test_env) where 7: eval(code, test_env) where 8: 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 9: doTryCatch(return(expr), name, parentenv, handler) where 10: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) where 12: doTryCatch(return(expr), name, parentenv, handler) where 13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) where 14: tryCatchList(expr, classes, parentenv, handlers) where 15: 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 16: test_code(desc, code, env = parent.frame(), reporter = reporter) where 17 at test_plotAncStatesPie.R#3: test_that("plots pies of ancestral states", { tree_file <- system.file("extdata", "dec/small_dec.tre", package = "RevGadgets") plot_file <- system.file("extdata", "graphs/plotAncStatesPie_df.rds", package = "RevGadgets") labs <- c(`1` = "K", `2` = "O", `3` = "M", `4` = "H", `5` = "KO", `6` = "KM", `7` = "OM", `8` = "KH", `9` = "OH", `10` = "MH", `11` = "KOM", `12` = "KOH", `13` = "KMH", `14` = "OMH", `15` = "KOMH") dec_example <- processAncStates(tree_file, state_labels = labs) colors <- colorRampPalette(colFun(12))(length(dec_example@state_labels)) names(colors) <- dec_example@state_labels plot_new <- plotAncStatesPie(t = dec_example, pie_colors = colors, tip_labels_size = 2, cladogenetic = TRUE, tip_labels_offset = 0.01, timeline = F, node_pie_size = 0.5, tip_pie_size = 0.3) + ggplot2::scale_x_continuous(limits = c(-0.5, 1)) + ggplot2::theme(legend.position = c(0.1, 0.75)) plot_orig <- readRDS(plot_file) tmp <- tempdir() pdf(paste0(tmp, "/Rplots.pdf")) expect_error(print(plot_new), NA) dev.off() expect_equal(plot_new$data, plot_orig) }) where 18: eval(code, test_env) where 19: eval(code, test_env) where 20: 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 21: doTryCatch(return(expr), name, parentenv, handler) where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) where 24: doTryCatch(return(expr), name, parentenv, handler) where 25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) where 26: tryCatchList(expr, classes, parentenv, handlers) where 27: 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 28: test_code(NULL, exprs, env) where 29: source_file(path, child_env(env), wrap = wrap) where 30: FUN(X[[i]], ...) where 31: lapply(test_paths, test_one_file, env = env, wrap = wrap) where 32: doTryCatch(return(expr), name, parentenv, handler) where 33: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 34: tryCatchList(expr, classes, parentenv, handlers) where 35: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL }) where 36: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, wrap = wrap)) where 37: 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 38: 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 39: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") where 40: test_check("RevGadgets") --- value of length: 5 type: logical --- KM M MH OM other FALSE FALSE FALSE FALSE FALSE --- function from context --- function (data, y, fill, color, alpha = 1) { p <- ggplot(data, aes_(x = 1, y = y, fill = fill)) + geom_bar(stat = "identity", alpha = alpha) + coord_polar(theta = "y") + theme_inset() if (missingArg(color) || is.null(color) || is.na(color)) { } else { p <- p + scale_fill_manual(values = color) } return(p) } --- function search by body --- Function ggpie in namespace ggtree 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 See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/RevGadgets.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 3:36.12, 132.50 + 11.64