* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/epiphy.Rcheck’ * using R Under development (unstable) (2022-03-07 r81853) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘epiphy/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘epiphy’ version ‘0.3.4’ * 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 ‘epiphy’ can be installed ... [45s/92s] 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 ... [22s/61s] 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 contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking pragmas in C/C++ headers and code ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... [5s/15s] ERROR Running examples in ‘epiphy-Ex.R’ failed The error most likely occurred in: > ### Name: agg_index > ### Title: Several aggregation indices. > ### Aliases: agg_index > > ### ** Examples > > # Count flavor of Fisher's index: > my_fisher_count <- agg_index(aphids$i) > my_fisher_count Fisher's index of dispersion: (Version for count data) 32.56 > > # And incidence flavor of Fisher's index: > my_fisher_incidence <- agg_index(tobacco_viruses$i, n = tobacco_viruses$n) ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- epiphy --- call from context --- fisher.default(x, flavor = flavor, n = n, ...) --- call from argument --- !is.null(n) && !is.na(n) --- R stacktrace --- where 1: fisher.default(x, flavor = flavor, n = n, ...) where 2: fisher(x, flavor = flavor, n = n, ...) where 3: agg_index(tobacco_viruses$i, n = tobacco_viruses$n) --- value of length: 75 type: logical --- [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [16] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [31] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [46] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [61] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE --- function from context --- function (x, flavor = c("count", "incidence"), n = NULL, ...) { call <- match.call() stopifnot(is.numeric(x)) flavor <- match.arg(flavor) if (!is.null(n) && !is.na(n)) { flavor <- "incidence" } x <- na.omit(x) N <- length(x) switch(flavor, count = { m <- mean(x) v <- var(x) res <- v/m }, incidence = { stopifnot(!is.null(n) && !is.na(n)) n <- unique(n) if (length(n) != 1) stop(paste0("Current implementation only deals ", "with equal size sampling units.")) if (!(n > 1)) stop(paste0("The number of individuals per sampling ", " unit ('n') must be > 1.")) stopifnot(all(x <= n)) m <- mean(x/n) v <- var(x/n) res <- v/(m * (1 - m)/n) }) structure(list(index = res, name = "Fisher's index of dispersion", flavor = flavor, N = N, n = n), class = c("fisher", "agg_index")) } --- function search by body --- Function fisher.default in namespace epiphy 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 ... [13s/30s] ERROR Error(s) in re-building vignettes: --- re-building ‘defs-and-eqns.Rmd’ using rmarkdown --- finished re-building ‘defs-and-eqns.Rmd’ --- re-building ‘epiphy.Rmd’ using rmarkdown ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- epiphy --- call from context --- fisher.default(mapped_data[["i"]], flavor = "incidence", n = mapped_data[["n"]]) --- call from argument --- !is.null(n) && !is.na(n) --- R stacktrace --- where 1: fisher.default(mapped_data[["i"]], flavor = "incidence", n = mapped_data[["n"]]) where 2: fisher.incidence(x, flavor = flavor, n = n, ...) where 3: fisher(x, flavor = flavor, n = n, ...) where 4: agg_index(inc9_t1) where 5: eval(expr, envir, enclos) where 6: eval(expr, envir, enclos) where 7: eval_with_user_handlers(expr, envir, enclos, user_handlers) where 8: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) where 9: withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) where 10: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) where 11: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) where 12: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, output_handler = output_handler, include_timing = include_timing) where 13: evaluate::evaluate(...) where 14: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)) where 15: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))) where 16: eng_r(options) where 17: block_exec(params) where 18: call_block(x) where 19: process_group.block(group) where 20: process_group(group) where 21: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { setwd(wd) cat(res, sep = "\n", file = output %n% "") message("Quitting from lines ", paste(current_lines(i), collapse = "-"), " (", knit_concord$get("infile"), ") ") }) where 22: process_file(text, output) where 23: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) where 24: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...) where 25: vweave_rmarkdown(...) where 26: engine$weave(file, quiet = quiet, encoding = enc) where 27: doTryCatch(return(expr), name, parentenv, handler) where 28: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 29: tryCatchList(expr, classes, parentenv, handlers) where 30: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) } outputs <- c(outputs, output) }, error = function(e) { thisOK <<- FALSE fails <<- c(fails, file) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e))) }) where 31: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-LENGTH1/epiphy.Rcheck/vign_test/epiphy") --- value of length: 160 type: logical --- [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [16] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [31] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [46] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [61] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [76] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [91] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [106] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [121] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [136] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [151] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE --- function from context --- function (x, flavor = c("count", "incidence"), n = NULL, ...) { call <- match.call() stopifnot(is.numeric(x)) flavor <- match.arg(flavor) if (!is.null(n) && !is.na(n)) { flavor <- "incidence" } x <- na.omit(x) N <- length(x) switch(flavor, count = { m <- mean(x) v <- var(x) res <- v/m }, incidence = { stopifnot(!is.null(n) && !is.na(n)) n <- unique(n) if (length(n) != 1) stop(paste0("Current implementation only deals ", "with equal size sampling units.")) if (!(n > 1)) stop(paste0("The number of individuals per sampling ", " unit ('n') must be > 1.")) stopifnot(all(x <= n)) m <- mean(x/n) v <- var(x/n) res <- v/(m * (1 - m)/n) }) structure(list(index = res, name = "Fisher's index of dispersion", flavor = flavor, N = N, n = n), class = c("fisher", "agg_index")) } --- function search by body --- Function fisher.default in namespace epiphy 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: 2 ERRORs See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/epiphy.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 6:29.14, 137.40 + 14.86