CRAN Package Check Results for Package surface

Last updated on 2020-02-19 10:49:12 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.4-1 5.18 101.61 106.79 WARN
r-devel-linux-x86_64-debian-gcc 0.4-1 4.98 73.65 78.63 WARN
r-devel-linux-x86_64-fedora-clang 0.4-1 122.87 WARN
r-devel-linux-x86_64-fedora-gcc 0.4-1 120.61 WARN
r-devel-windows-ix86+x86_64 0.4-1 10.00 171.00 181.00 NOTE
r-devel-windows-ix86+x86_64-gcc8 0.4-1 17.00 168.00 185.00 NOTE
r-patched-linux-x86_64 0.4-1 5.12 148.19 153.31 NOTE
r-patched-solaris-x86 0.4-1 242.50 NOTE
r-release-linux-x86_64 0.4-1 4.54 148.74 153.28 NOTE
r-release-windows-ix86+x86_64 0.4-1 10.00 168.00 178.00 NOTE
r-release-osx-x86_64 0.4-1 NOTE
r-oldrel-windows-ix86+x86_64 0.4-1 6.00 174.00 180.00 NOTE
r-oldrel-osx-x86_64 0.4-1 NOTE

Check Details

Version: 0.4-1
Check: R code for possible problems
Result: NOTE
    addRegime: no visible global function definition for 'abline'
    collapseRegimes: no visible global function definition for 'abline'
    convertBack: no visible global function definition for 'as'
    convertTreeData: no visible global function definition for 'as'
    getBranchTimes: no visible global function definition for 'as'
    propRegMatch: no visible global function definition for 'as'
    startingModel: no visible global function definition for 'var'
    surfaceAICMultiPlot: no visible global function definition for 'points'
    surfaceAICMultiPlot: no visible global function definition for 'abline'
    surfaceAICPlot: no visible global function definition for 'rainbow'
    surfaceAICPlot: no visible global function definition for 'abline'
    surfaceAICPlot: no visible global function definition for 'points'
    surfaceBackward: no visible global function definition for 'as'
    surfaceForward: no visible global function definition for 'as'
    surfaceSimulate : <anonymous>: no visible global function definition
     for 'sd'
    surfaceSimulate: no visible global function definition for 'rnorm'
    surfaceSimulate: no visible global function definition for 'runif'
    surfaceSimulate: no visible global function definition for 'as'
    surfaceSimulate: no visible global function definition for 'rmultinom'
    surfaceTraitPlot: no visible global function definition for 'as'
    surfaceTraitPlot: no visible global function definition for 'rainbow'
    surfaceTraitPlot: no visible global function definition for 'grey'
    surfaceTraitPlot: no visible global function definition for 'polygon'
    surfaceTraitPlot: no visible global function definition for 'points'
    surfaceTreePlot: no visible global function definition for 'as'
    surfaceTreePlot: no visible global function definition for 'rainbow'
    surfaceTreePlot: no visible global function definition for 'grey'
    Undefined global functions or variables:
     abline as grey points polygon rainbow rmultinom rnorm runif sd var
    Consider adding
     importFrom("grDevices", "grey", "rainbow")
     importFrom("graphics", "abline", "points", "polygon")
     importFrom("methods", "as")
     importFrom("stats", "rmultinom", "rnorm", "runif", "sd", "var")
    to your NAMESPACE file (and ensure that your DESCRIPTION Imports field
    contains 'methods').
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64, r-devel-windows-ix86+x86_64-gcc8, r-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 0.4-1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'surface_tutorial.Rnw' using Sweave
    Loading required package: ape
    Loading required package: ouch
    Loading required package: subplex
    Loading required package: MASS
    Loading required package: geiger
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    surface
     --- call from context ---
    surfaceSummary(fwd)
     --- call from argument ---
    if (class(lnls) != "matrix") lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1],
     NULL))
     --- R stacktrace ---
    where 1: surfaceSummary(fwd)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: tryCatch(expr, error = function(e) {
     call <- conditionCall(e)
     if (!is.null(call)) {
     if (identical(call[[1L]], quote(doTryCatch)))
     call <- sys.call(-4L)
     dcall <- deparse(call)[1L]
     prefix <- paste("Error in", dcall, ": ")
     LONG <- 75L
     sm <- strsplit(conditionMessage(e), "\n")[[1L]]
     w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
     if (is.na(w))
     w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
     type = "b")
     if (w > LONG)
     prefix <- paste0(prefix, "\n ")
     }
     else prefix <- "Error : "
     msg <- paste0(prefix, conditionMessage(e), "\n")
     .Internal(seterrmessage(msg[1L]))
     if (!silent && isTRUE(getOption("show.error.messages"))) {
     cat(msg, file = outFile)
     .Internal(printDeferredWarnings())
     }
     invisible(structure(msg, class = "try-error", condition = e))
    })
    where 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: 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 20: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/surface.Rcheck/vign_test/surface",
     ser_elibs = "/tmp/RtmpheLSfa/file3c5f469f8511.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (fwd = NULL, bwd = NULL)
    {
     if (is.null(fwd))
     obj <- bwd
     if (is.null(bwd))
     obj <- fwd
     if (!is.null(fwd) & !is.null(bwd)) {
     obj <- c(fwd[-length(fwd)], bwd)
     }
     k <- length(obj)
     lnls <- sapply(obj, function(x) {
     sapply(x$fit, function(y) summary(y)$loglik)
     })
     if (class(lnls) != "matrix")
     lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1],
     NULL))
     aics <- sapply(obj, function(x) x$aic)
     names(aics) <- 1:k
     n_regimes_seq <- sapply(obj, function(x) x$n_regimes)
     obj <- obj[[k]]
     shifts <- obj$savedshifts
     n_regimes <- obj$n_regimes
     obj <- obj$fit
     alpha <- sapply(obj, function(x) summary(x)$alpha)
     phylhalflife <- log(2)/alpha
     sigma_squared <- sapply(obj, function(x) summary(x)$sigma.squared)
     theta <- sapply(obj, function(x) summary(x)$optima[[1]])
     list(n_steps = k, lnls = lnls, n_regimes_seq = n_regimes_seq,
     aics = aics, shifts = shifts, n_regimes = n_regimes,
     alpha = alpha, phylhalflife = phylhalflife, sigma_squared = sigma_squared,
     theta = theta)
    }
    <bytecode: 0x30f9748>
    <environment: namespace:surface>
     --- function search by body ---
    Function surfaceSummary in namespace surface has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'surface_tutorial.Rnw' failed with diagnostics:
     chunk 4
    Error in if (class(lnls) != "matrix") lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1], :
     the condition has length > 1
    
    --- failed re-building 'surface_tutorial.Rnw'
    
    SUMMARY: processing the following file failed:
     'surface_tutorial.Rnw'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.4-1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘surface_tutorial.Rnw’ using Sweave
    Loading required package: ape
    Loading required package: ouch
    Loading required package: subplex
    Loading required package: MASS
    Loading required package: geiger
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    surface
     --- call from context ---
    surfaceSummary(fwd)
     --- call from argument ---
    if (class(lnls) != "matrix") lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1],
     NULL))
     --- R stacktrace ---
    where 1: surfaceSummary(fwd)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: tryCatch(expr, error = function(e) {
     call <- conditionCall(e)
     if (!is.null(call)) {
     if (identical(call[[1L]], quote(doTryCatch)))
     call <- sys.call(-4L)
     dcall <- deparse(call)[1L]
     prefix <- paste("Error in", dcall, ": ")
     LONG <- 75L
     sm <- strsplit(conditionMessage(e), "\n")[[1L]]
     w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
     if (is.na(w))
     w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
     type = "b")
     if (w > LONG)
     prefix <- paste0(prefix, "\n ")
     }
     else prefix <- "Error : "
     msg <- paste0(prefix, conditionMessage(e), "\n")
     .Internal(seterrmessage(msg[1L]))
     if (!silent && isTRUE(getOption("show.error.messages"))) {
     cat(msg, file = outFile)
     .Internal(printDeferredWarnings())
     }
     invisible(structure(msg, class = "try-error", condition = e))
    })
    where 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: 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 20: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/surface.Rcheck/vign_test/surface",
     ser_elibs = "/home/hornik/tmp/scratch/Rtmpmxdc6M/file594b6b8eb1ca.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (fwd = NULL, bwd = NULL)
    {
     if (is.null(fwd))
     obj <- bwd
     if (is.null(bwd))
     obj <- fwd
     if (!is.null(fwd) & !is.null(bwd)) {
     obj <- c(fwd[-length(fwd)], bwd)
     }
     k <- length(obj)
     lnls <- sapply(obj, function(x) {
     sapply(x$fit, function(y) summary(y)$loglik)
     })
     if (class(lnls) != "matrix")
     lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1],
     NULL))
     aics <- sapply(obj, function(x) x$aic)
     names(aics) <- 1:k
     n_regimes_seq <- sapply(obj, function(x) x$n_regimes)
     obj <- obj[[k]]
     shifts <- obj$savedshifts
     n_regimes <- obj$n_regimes
     obj <- obj$fit
     alpha <- sapply(obj, function(x) summary(x)$alpha)
     phylhalflife <- log(2)/alpha
     sigma_squared <- sapply(obj, function(x) summary(x)$sigma.squared)
     theta <- sapply(obj, function(x) summary(x)$optima[[1]])
     list(n_steps = k, lnls = lnls, n_regimes_seq = n_regimes_seq,
     aics = aics, shifts = shifts, n_regimes = n_regimes,
     alpha = alpha, phylhalflife = phylhalflife, sigma_squared = sigma_squared,
     theta = theta)
    }
    <bytecode: 0x559bd55dcae0>
    <environment: namespace:surface>
     --- function search by body ---
    Function surfaceSummary in namespace surface has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'surface_tutorial.Rnw' failed with diagnostics:
     chunk 4
    Error in if (class(lnls) != "matrix") lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1], :
     the condition has length > 1
    
    --- failed re-building ‘surface_tutorial.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘surface_tutorial.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.4-1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘surface_tutorial.Rnw’ using Sweave
    Loading required package: ape
    Loading required package: ouch
    Loading required package: subplex
    Loading required package: MASS
    Loading required package: geiger
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    surface
     --- call from context ---
    surfaceSummary(fwd)
     --- call from argument ---
    if (class(lnls) != "matrix") lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1],
     NULL))
     --- R stacktrace ---
    where 1: surfaceSummary(fwd)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: tryCatch(expr, error = function(e) {
     call <- conditionCall(e)
     if (!is.null(call)) {
     if (identical(call[[1L]], quote(doTryCatch)))
     call <- sys.call(-4L)
     dcall <- deparse(call)[1L]
     prefix <- paste("Error in", dcall, ": ")
     LONG <- 75L
     sm <- strsplit(conditionMessage(e), "\n")[[1L]]
     w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
     if (is.na(w))
     w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
     type = "b")
     if (w > LONG)
     prefix <- paste0(prefix, "\n ")
     }
     else prefix <- "Error : "
     msg <- paste0(prefix, conditionMessage(e), "\n")
     .Internal(seterrmessage(msg[1L]))
     if (!silent && isTRUE(getOption("show.error.messages"))) {
     cat(msg, file = outFile)
     .Internal(printDeferredWarnings())
     }
     invisible(structure(msg, class = "try-error", condition = e))
    })
    where 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: 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 20: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-clang/surface.Rcheck/vign_test/surface",
     ser_elibs = "/tmp/RtmpWQlVWD/file73d073c7a4cb.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (fwd = NULL, bwd = NULL)
    {
     if (is.null(fwd))
     obj <- bwd
     if (is.null(bwd))
     obj <- fwd
     if (!is.null(fwd) & !is.null(bwd)) {
     obj <- c(fwd[-length(fwd)], bwd)
     }
     k <- length(obj)
     lnls <- sapply(obj, function(x) {
     sapply(x$fit, function(y) summary(y)$loglik)
     })
     if (class(lnls) != "matrix")
     lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1],
     NULL))
     aics <- sapply(obj, function(x) x$aic)
     names(aics) <- 1:k
     n_regimes_seq <- sapply(obj, function(x) x$n_regimes)
     obj <- obj[[k]]
     shifts <- obj$savedshifts
     n_regimes <- obj$n_regimes
     obj <- obj$fit
     alpha <- sapply(obj, function(x) summary(x)$alpha)
     phylhalflife <- log(2)/alpha
     sigma_squared <- sapply(obj, function(x) summary(x)$sigma.squared)
     theta <- sapply(obj, function(x) summary(x)$optima[[1]])
     list(n_steps = k, lnls = lnls, n_regimes_seq = n_regimes_seq,
     aics = aics, shifts = shifts, n_regimes = n_regimes,
     alpha = alpha, phylhalflife = phylhalflife, sigma_squared = sigma_squared,
     theta = theta)
    }
    <bytecode: 0x6922b28>
    <environment: namespace:surface>
     --- function search by body ---
    Function surfaceSummary in namespace surface has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'surface_tutorial.Rnw' failed with diagnostics:
     chunk 4
    Error in if (class(lnls) != "matrix") lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1], :
     the condition has length > 1
    
    --- failed re-building ‘surface_tutorial.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘surface_tutorial.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.4-1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘surface_tutorial.Rnw’ using Sweave
    Loading required package: ape
    Loading required package: ouch
    Loading required package: subplex
    Loading required package: MASS
    Loading required package: geiger
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    surface
     --- call from context ---
    surfaceSummary(fwd)
     --- call from argument ---
    if (class(lnls) != "matrix") lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1],
     NULL))
     --- R stacktrace ---
    where 1: surfaceSummary(fwd)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: tryCatch(expr, error = function(e) {
     call <- conditionCall(e)
     if (!is.null(call)) {
     if (identical(call[[1L]], quote(doTryCatch)))
     call <- sys.call(-4L)
     dcall <- deparse(call)[1L]
     prefix <- paste("Error in", dcall, ": ")
     LONG <- 75L
     sm <- strsplit(conditionMessage(e), "\n")[[1L]]
     w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
     if (is.na(w))
     w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
     type = "b")
     if (w > LONG)
     prefix <- paste0(prefix, "\n ")
     }
     else prefix <- "Error : "
     msg <- paste0(prefix, conditionMessage(e), "\n")
     .Internal(seterrmessage(msg[1L]))
     if (!silent && isTRUE(getOption("show.error.messages"))) {
     cat(msg, file = outFile)
     .Internal(printDeferredWarnings())
     }
     invisible(structure(msg, class = "try-error", condition = e))
    })
    where 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: 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 20: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-devel/surface.Rcheck/vign_test/surface",
     ser_elibs = "/tmp/RtmpP9T0mf/file22026eeb128f.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (fwd = NULL, bwd = NULL)
    {
     if (is.null(fwd))
     obj <- bwd
     if (is.null(bwd))
     obj <- fwd
     if (!is.null(fwd) & !is.null(bwd)) {
     obj <- c(fwd[-length(fwd)], bwd)
     }
     k <- length(obj)
     lnls <- sapply(obj, function(x) {
     sapply(x$fit, function(y) summary(y)$loglik)
     })
     if (class(lnls) != "matrix")
     lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1],
     NULL))
     aics <- sapply(obj, function(x) x$aic)
     names(aics) <- 1:k
     n_regimes_seq <- sapply(obj, function(x) x$n_regimes)
     obj <- obj[[k]]
     shifts <- obj$savedshifts
     n_regimes <- obj$n_regimes
     obj <- obj$fit
     alpha <- sapply(obj, function(x) summary(x)$alpha)
     phylhalflife <- log(2)/alpha
     sigma_squared <- sapply(obj, function(x) summary(x)$sigma.squared)
     theta <- sapply(obj, function(x) summary(x)$optima[[1]])
     list(n_steps = k, lnls = lnls, n_regimes_seq = n_regimes_seq,
     aics = aics, shifts = shifts, n_regimes = n_regimes,
     alpha = alpha, phylhalflife = phylhalflife, sigma_squared = sigma_squared,
     theta = theta)
    }
    <bytecode: 0x510fb78>
    <environment: namespace:surface>
     --- function search by body ---
    Function surfaceSummary in namespace surface has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'surface_tutorial.Rnw' failed with diagnostics:
     chunk 4
    Error in if (class(lnls) != "matrix") lnls <- matrix(lnls, nrow = 1, dimnames = list(names(lnls)[1], :
     the condition has length > 1
    
    --- failed re-building ‘surface_tutorial.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘surface_tutorial.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc