* using log directory 'd:/Rcompile/CRANpkg/local/4.7/phylobase.Rcheck' * using R Under development (unstable) (2026-05-01 r89993 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.3.0 GNU Fortran (GCC) 14.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * current time: 2026-05-03 16:37:07 UTC * checking for file 'phylobase/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'phylobase' version '0.8.12' * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'phylobase' can be installed ... OK * used C compiler: 'gcc.exe (GCC) 14.3.0' * used C++ compiler: 'g++.exe (GCC) 14.3.0' * checking installed package size ... 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 code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [2s] OK * checking whether the package can be loaded with stated dependencies ... [2s] OK * checking whether the package can be unloaded cleanly ... [2s] OK * checking whether the namespace can be loaded with stated dependencies ... [2s] OK * checking whether the namespace can be unloaded cleanly ... [2s] OK * checking loading without being on the library search path ... [2s] OK * checking whether startup messages can be suppressed ... [2s] 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 ... [10s] OK * checking Rd files ... [1s] 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 contents of 'data' directory ... OK * checking data for non-ASCII characters ... [2s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [7s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [31s] ERROR Running 'misctests.R' [4s] Running 'phylo4dtests.R' [3s] Running 'phylosubtest.R' [2s] Running 'phylotorture.R' [3s] Running 'plottest.R' [3s] Running 'roundtrip.R' [2s] Running 'test-all.R' [12s] Running 'testprune.R' [3s] Running the tests in 'tests/phylotorture.R' failed. Complete output: > ## torture-testing phylo4 objects. > library(phylobase) > library(ape) Attaching package: 'ape' The following object is masked from 'package:phylobase': edges > > set.seed(10101) > n <- 200 > p1 <- vector("list", n) > ## don't want to slow down R CMD check by doing this every time: > ## n <- 10000 > for (i in 1:n) { + if (i <= n/2) { + e <- matrix(sample(1:10, replace=TRUE, size=10), ncol=2) + } + else { + e <- cbind(sample(rep(11:19, 2)), sample(1:19)) + e <- rbind(c(0, sample(11:19, 1)), e) + } + p1[[i]] <- try(phylo4(e), silent=TRUE) + } There were 50 or more warnings (use warnings() to see the first 50) > OKvals <- sapply(p1, class) != "try-error" > ## table(sapply(p1[!OKvals], as.character)) # I think this is causing issues with > ## R check because of different width of terminal/output, trying something simpler: > message(unique(sapply(p1[!OKvals], as.character))) Error in .local(x, ...) : Tree is reticulated. Error in names(res) <- switch(type, tip = 1:ntips, internal = seq(from = ntips + : 'names' attribute [2] must be the same length as the vector [1] Error in .local(x, ...) : Tips incorrectly labeled. Nodes incorrectly labeled. Error in .local(x, ...) : Nodes incorrectly labeled. > sort(unname(table(sapply(p1[!OKvals], as.character)))) [1] 2 13 34 151 > if (sum(OKvals)) message("There are ", sum(OKvals), " valid trees...") > > if (any(OKvals)) { + p2 <- p1[OKvals] + length(p2) + has.poly <- sapply(p2, hasPoly) + has.sing <- sapply(p2, hasSingle) + has.retic <- sapply(p2, hasRetic) + message("number of trees with polytomies: ", sum(has.poly)) + message("number of trees with singletons: ", sum(has.sing)) + message("number of trees with reticulation: ", sum(has.retic)) + if (any(has.sing)) { + p4 <- p2[has.sing] + plot(p4[[1]]) ## gives descriptive error + t2 <- try(plot(collapse.singles(as(p2[[1]],"phylo")))) + ## "incorrect number of dimensions" + } + if (any(!has.sing)) { + ## first tree without singles -- HANGS! + ## don't try the plot in an R session you care about ... + p3 <- p2[!has.sing] + ## plot(p2[[13]]) + } + } > > ## elements 8 and 34 are > ## what SHOULD the rules for trees be? > > ## (a) reduce node numbers to 1 ... N ? > ## (b) check: irreducible, non-cyclic, ... ? > > ## convert to matrix format for checking? > > reduce_nodenums <- function(e) { + matrix(as.numeric(factor(e)),ncol=2) + } > > # make an illegal phylo4 object, does it pass checks? > # a disconnected node: > > t1 <- read.tree (text="((a,b), (c,(d, e)));") > plot(t1) > > broke1 <- t1 > broke1$edge[broke1$edge[,2] ==9, 1] <- 9 # disconnect the node, two subtrees, ((a, b), c) and (d,e) > > try(as(broke1, "phylo4") -> tree, silent=TRUE) # makes a phylo4 object with no warning Warning message: In checkTree(object) : Tree contains singleton nodes. > try(phylo4(broke1$edge), silent=TRUE) # constructor makes a phylo4 object with no warning Error in as.data.frame.numeric(x[[i]], optional = TRUE) : row names contain missing values Calls: ... data.frame -> as.data.frame -> as.data.frame.numeric In addition: Warning messages: 1: In checkTree(object) : Tree contains singleton nodes. 2: In checkTree(object) : Tree contains singleton nodes. Execution halted Running the tests in 'tests/test-all.R' failed. Complete output: > ## This script is only run during R CMD check, so we can set an environment > ## variable that will only run tests during R CMD check (or `devtools::check()`) > ## and not during `devtools::test()`. > > ## Thus in the tests, we can request the NEXUS files that are stored in the > ## `inst/` folder, but during the checks, we test the files that have been > ## installed (using the `system.file()` function). > > library(testthat) > > Sys.setenv("R_CMD_CHECK" = "true") > > test_check("phylobase") Loading required package: phylobase Saving _problems/test.readNCL-96.R Saving _problems/test.readNCL-112.R Saving _problems/test.readNCL-131.R Saving _problems/test.setAs-Methods-182.R [ FAIL 4 | WARN 2 | SKIP 0 | PASS 632 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test.readNCL.R:96:5'): file with 2 trees (warning normal) ─────────── Error in `as.data.frame.numeric(x[[i]], optional = TRUE)`: row names contain missing values Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test.readNCL.R:96:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─methods::as(co1Tree1, "data.frame") 5. └─phylobase (local) asMethod(object) 6. └─phylobase:::.phylo4ToDataFrame(from, edgeOrder = "pretty") 7. └─base::data.frame(...) 8. ├─base::as.data.frame(x[[i]], optional = TRUE) 9. └─base::as.data.frame.numeric(x[[i]], optional = TRUE) ── Error ('test.readNCL.R:112:5'): test option simplify ──────────────────────── Error in `as.data.frame.numeric(x[[i]], optional = TRUE)`: row names contain missing values Backtrace: ▆ 1. ├─testthat::expect_equal(as(co1, "data.frame")$labelValues, lVco1) at test.readNCL.R:112:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─methods::as(co1, "data.frame") 5. └─phylobase (local) asMethod(object) 6. └─phylobase:::.phylo4ToDataFrame(from, edgeOrder = "pretty") 7. └─base::data.frame(...) 8. ├─base::as.data.frame(x[[i]], optional = TRUE) 9. └─base::as.data.frame.numeric(x[[i]], optional = TRUE) ── Error ('test.readNCL.R:131:5'): test option check.node.labels ─────────────── Error in `as.data.frame.numeric(x[[i]], optional = TRUE)`: row names contain missing values Backtrace: ▆ 1. ├─testthat::expect_equal(as(co1, "data.frame")$labelValues, NULL) at test.readNCL.R:131:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─methods::as(co1, "data.frame") 5. └─phylobase (local) asMethod(object) 6. └─phylobase:::.phylo4ToDataFrame(from, edgeOrder = "pretty") 7. └─base::data.frame(...) 8. ├─base::as.data.frame(x[[i]], optional = TRUE) 9. └─base::as.data.frame.numeric(x[[i]], optional = TRUE) ── Error ('test.setAs-Methods.R:182:5'): phylo4 to data.frame ────────────────── Error in `as.data.frame.numeric(x[[i]], optional = TRUE)`: row names contain missing values Backtrace: ▆ 1. ├─testthat::expect_true(is.data.frame(as(phyu, "data.frame"))) at test.setAs-Methods.R:182:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::is.data.frame(as(phyu, "data.frame")) 5. └─methods::as(phyu, "data.frame") 6. └─phylobase (local) asMethod(object) 7. └─phylobase:::.phylo4ToDataFrame(from, edgeOrder = "pretty") 8. └─base::data.frame(...) 9. ├─base::as.data.frame(x[[i]], optional = TRUE) 10. └─base::as.data.frame.numeric(x[[i]], optional = TRUE) [ FAIL 4 | WARN 2 | SKIP 0 | PASS 632 ] Error: ! Test failures. Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [2s] OK * checking PDF version of manual ... [21s] OK * checking HTML version of manual ... [12s] OK * DONE Status: 1 ERROR