CRAN Package Check Results for Package markovchain

Last updated on 2019-11-26 00:51:57 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.8.0 156.10 151.59 307.69 ERROR
r-devel-linux-x86_64-debian-gcc 0.8.0 124.31 118.54 242.85 ERROR
r-devel-linux-x86_64-fedora-clang 0.8.0 564.74 WARN
r-devel-linux-x86_64-fedora-gcc 0.8.0 550.98 WARN
r-devel-windows-ix86+x86_64 0.8.0 385.00 405.00 790.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.8.0 394.00 369.00 763.00 OK
r-patched-linux-x86_64 0.8.0 131.61 293.31 424.92 OK
r-patched-solaris-x86 0.8.0 569.00 OK
r-release-linux-x86_64 0.8.0 129.74 290.00 419.74 OK
r-release-windows-ix86+x86_64 0.8.0 362.00 484.00 846.00 OK
r-release-osx-x86_64 0.8.0 NOTE
r-oldrel-windows-ix86+x86_64 0.8.0 274.00 446.00 720.00 OK
r-oldrel-osx-x86_64 0.8.0 NOTE

Check Details

Version: 0.8.0
Check: examples
Result: ERROR
    Running examples in 'markovchain-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: fitHighOrderMultivarMC
    > ### Title: Function to fit Higher Order Multivariate Markov chain
    > ### Aliases: fitHighOrderMultivarMC
    >
    > ### ** Examples
    >
    > data <- matrix(c('2', '1', '3', '3', '4', '3', '2', '1', '3', '3', '2', '1',
    + c('2', '4', '4', '4', '4', '2', '3', '3', '1', '4', '3', '3')),
    + ncol = 2, byrow = FALSE)
    >
    > fitHighOrderMultivarMC(data, order = 2, Norm = 2)
    This function is experimental
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    markovchain
     --- call from context ---
    fitHighOrderMultivarMC(data, order = 2, Norm = 2)
     --- call from argument ---
    if (class(seqMat) == "data.frame") {
     seqMat <- as.matrix(seqMat)
    }
     --- R stacktrace ---
    where 1: fitHighOrderMultivarMC(data, order = 2, Norm = 2)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (seqMat, order = 2, Norm = 2)
    {
     message("This function is experimental")
     if (class(seqMat) == "data.frame") {
     seqMat <- as.matrix(seqMat)
     }
     seqMat <- t(seqMat)
     allTmat <- .allTransMat(seqMat, order = order)
     freqMat <- .allFreqProbMat(seqMat)
     n <- order
     uelement <- sort(unique(as.character(seqMat)))
     m <- length(uelement)
     s <- nrow(seqMat)
     lmbda <- rep(1/(n * s), n * s * s)
     fit <- Rsolnp::solnp(pars = lmbda, fun = .fn3, eqfun = .eqn3,
     eqB = rep(1, s), LB = rep(0, n * s * s), control = list(trace = 0),
     allTmat = allTmat, freqMat = freqMat, n = n, m = m, s = s,
     Norm = Norm)
     return(new("hommc", order = order, Lambda = fit$pars, P = allTmat,
     states = uelement, byrow = FALSE))
    }
    <bytecode: 0x7f4f9b8>
    <environment: namespace:markovchain>
     --- function search by body ---
    Function fitHighOrderMultivarMC in namespace markovchain has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.8.0
Check: tests
Result: ERROR
     Running 'testthat.R' [19s/20s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(markovchain)
     Package: markovchain
     Version: 0.8.0
     Date: 2019-09-13
     BugReport: http://github.com/spedygiorgio/markovchain/issues
    
     > test_check("markovchain")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     markovchain
     --- call from context ---
     markovchainListFit(data = myHolson)
     --- call from argument ---
     if (class(data) == "list") {
     markovchains <- list()
     freqMatrixes <- .mcListFitForList(data)
     } else {
     if (is.data.frame(data)) {
     data <- unname(as.matrix(data))
     }
     if (!byrow) {
     data <- t(data)
     }
     nCols <- ncol(data)
     freqMatrixes <- lapply(seq_len(nCols - 1), function(i) {
     matrData <- data[, c(i, i + 1)]
     matrData[1, ] <- as.character(matrData[1, ])
     validTransition <- any(apply(matrData, 1, function(x) {
     !any(is.na(x))
     }))
     if (validTransition)
     createSequenceMatrix(matrData, toRowProbs = FALSE,
     sanitize = TRUE)
     })
     freqMatrixes <- freqMatrixes[!sapply(freqMatrixes, is.null)]
     }
     --- R stacktrace ---
     where 1: markovchainListFit(data = myHolson)
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/testFits.R#19: expect_equal(markovchainListFit(data = myHolson), checkmarkovchainFitList)
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: 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 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/testFits.R#17: test_that("Check markovchainFit & listFit", {
     expect_equal(markovchainFit(ciao), simpleMcCiaoFit)
     expect_equal(markovchainListFit(data = myHolson), checkmarkovchainFitList)
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: 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 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("markovchain")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (data, byrow = TRUE, laplacian = 0, name)
     {
     if (!any((class(data) %in% c("data.frame", "matrix", "list")))) {
     stop("Error: data must be either a matrix or a data.frame or a list")
     }
     freqMatrixes <- list()
     if (class(data) == "list") {
     markovchains <- list()
     freqMatrixes <- .mcListFitForList(data)
     }
     else {
     if (is.data.frame(data)) {
     data <- unname(as.matrix(data))
     }
     if (!byrow) {
     data <- t(data)
     }
     nCols <- ncol(data)
     freqMatrixes <- lapply(seq_len(nCols - 1), function(i) {
     matrData <- data[, c(i, i + 1)]
     matrData[1, ] <- as.character(matrData[1, ])
     validTransition <- any(apply(matrData, 1, function(x) {
     !any(is.na(x))
     }))
     if (validTransition)
     createSequenceMatrix(matrData, toRowProbs = FALSE,
     sanitize = TRUE)
     })
     freqMatrixes <- freqMatrixes[!sapply(freqMatrixes, is.null)]
     }
     if (length(freqMatrixes) == 0) {
     return(list())
     }
     markovchains <- lapply(freqMatrixes, function(freqMatrix) {
     freqMatrix <- freqMatrix + laplacian
     rSums <- rowSums(freqMatrix)
     tMatrix <- freqMatrix/rSums
     estMc <- new("markovchain", transitionMatrix = tMatrix)
     estMc
     })
     outMcList <- new("markovchainList", markovchains = markovchains)
     out <- list(estimate = outMcList)
     if (!missing(name)) {
     out$estimate@name <- name
     }
     return(out)
     }
     <bytecode: 0xaf893f8>
     <environment: namespace:markovchain>
     --- function search by body ---
     Function markovchainListFit in namespace markovchain has this body.
     ----------- END OF FAILURE REPORT --------------
     Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.8.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'an_introduction_to_markovchain_package.Rmd' using rmarkdown
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    Loading required package: TraMineR
    
    TraMineR stable version 2.0-13 (Built: 2019-11-24)
    Website: http://traminer.unige.ch
    Please type 'citation("TraMineR")' for citation information.
    
    Loading required package: colorspace
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    markovchain
     --- call from context ---
    verifyHomogeneity(inputList = kullback, verbose = TRUE)
     --- call from argument ---
    if (class(inputList[[i]]) == "matrix") {
     checks <- .checkMatrix4Homogeneity(inputList[[i]])
     if (!checks)
     stop("Error! Element ", i, " to be checked")
    } else {
     inputList[[i]] <- createSequenceMatrix(stringchar = inputList[[i]])
    }
     --- R stacktrace ---
    where 1: verifyHomogeneity(inputList = kullback, verbose = TRUE)
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: 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 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: 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 (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: 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 17: process_file(text, output)
    where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet,
     encoding = encoding)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: 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)
     }
    }, error = function(e) {
     OK <<- FALSE
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 26: tools:::.buildOneVignette("an_introduction_to_markovchain_package.Rmd",
     "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/markovchain.Rcheck/vign_test/markovchain",
     TRUE, FALSE, "an_introduction_to_markovchain_package", "UTF-8",
     "/tmp/RtmpYpC1Os/file47e660d78679.rds")
    
     --- value of length: 2 type: logical ---
    [1] TRUE FALSE
     --- function from context ---
    function (inputList, verbose = TRUE)
    {
     warning("The accuracy of the statistical inference functions has been questioned. It will be thoroughly investigated in future versions of the package.")
     if (class(inputList) != "list")
     stop("Error! inputList should be a string")
     if (length(inputList) < 2)
     stop("Error! inputList length lower than 2")
     for (i in 1:length(inputList)) {
     if (class(inputList[[i]]) == "matrix") {
     checks <- .checkMatrix4Homogeneity(inputList[[i]])
     if (!checks)
     stop("Error! Element ", i, " to be checked")
     }
     else {
     inputList[[i]] <- createSequenceMatrix(stringchar = inputList[[i]])
     }
     }
     all.names <- character()
     for (i in 1:length(inputList)) {
     all.names <- c(all.names, rownames(inputList[[i]]))
     }
     all.names <- sort(unique(all.names))
     PooledRawTransitionMatrix <- matrix(0, nrow = length(all.names),
     ncol = length(all.names), dimnames = list(all.names,
     all.names))
     RowSumsMatrix <- matrix(0, nrow = length(inputList), ncol = length(all.names),
     dimnames = list(1:length(inputList), all.names))
     for (k in 1:length(inputList)) {
     current_support = rownames(inputList[[k]])
     current_dim = dim(inputList[[k]])
     for (i in 1:current_dim[1]) {
     for (j in 1:current_dim[2]) {
     num_trans <- inputList[[k]][i, j]
     which_row_trans <- current_support[i]
     which_col_trans <- current_support[j]
     row_to_write <- match(x = which_row_trans, table = all.names)
     col_to_write <- match(x = which_col_trans, table = all.names)
     PooledRawTransitionMatrix[row_to_write, col_to_write] = PooledRawTransitionMatrix[row_to_write,
     col_to_write] + num_trans
     }
     }
     }
     for (k in 1:length(inputList)) {
     my_row_sums <- rowSums(inputList[[k]])
     current_support = names(my_row_sums)
     for (i in 1:length(current_support)) {
     my_element <- my_row_sums[i]
     col_to_write <- match(x = current_support[i], table = all.names)
     RowSumsMatrix[k, col_to_write] <- RowSumsMatrix[k,
     col_to_write] + my_element
     }
     }
     statistic <- 0
     newInputList <- lapply(inputList, .addNamedColumns, fullnames = all.names)
     number_of_transitions <- sapply(newInputList, sum)
     total_transitions <- sum(number_of_transitions)
     for (s in 1:length(inputList)) {
     for (j in 1:length(all.names)) {
     for (k in 1:length(all.names)) {
     if (any(newInputList[[s]][j, k] == 0, number_of_transitions[s] ==
     0, PooledRawTransitionMatrix[j, k] == 0)) {
     statistic <- statistic + 0
     }
     else {
     statistic <- statistic + newInputList[[s]][j,
     k] * log((total_transitions * newInputList[[s]][j,
     k])/(number_of_transitions[s] * PooledRawTransitionMatrix[j,
     k]))
     }
     }
     }
     }
     statistic <- statistic * 2
     degrees_of_freedom <- (length(inputList) - 1) * (length(all.names)^2 -
     1)
     p.value <- 1 - pchisq(q = statistic, df = degrees_of_freedom)
     if (verbose == TRUE) {
     cat("Testing homogeneity of DTMC underlying input list \n")
     cat("ChiSq statistic is", statistic, "d.o.f are", degrees_of_freedom,
     "corresponding p-value is", p.value, "\n")
     }
     out <- list(statistic = statistic, dof = degrees_of_freedom,
     pvalue = p.value)
     return(out)
    }
    <bytecode: 0xa60edd0>
    <environment: namespace:markovchain>
     --- function search by body ---
    Function verifyHomogeneity in namespace markovchain has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
    --- re-building 'gsoc_2017_additions.Rmd' using rmarkdown
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    --- finished re-building 'gsoc_2017_additions.Rmd'
    
    --- re-building 'higher_order_markov_chains.Rmd' using rmarkdown
    Loading required package: markovchain
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    This function is experimental
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    markovchain
     --- call from context ---
    fitHighOrderMultivarMC(sales, order = 8, Norm = 2)
     --- call from argument ---
    if (class(seqMat) == "data.frame") {
     seqMat <- as.matrix(seqMat)
    }
     --- R stacktrace ---
    where 1: fitHighOrderMultivarMC(sales, order = 8, Norm = 2)
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: 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 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: 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 (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: 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 17: process_file(text, output)
    where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet,
     encoding = encoding)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: 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)
     }
    }, error = function(e) {
     OK <<- FALSE
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 26: tools:::.buildOneVignette("higher_order_markov_chains.Rmd", "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/markovchain.Rcheck/vign_test/markovchain",
     TRUE, FALSE, "higher_order_markov_chains", "UTF-8", "/tmp/RtmpYpC1Os/file47e64c957999.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (seqMat, order = 2, Norm = 2)
    {
     message("This function is experimental")
     if (class(seqMat) == "data.frame") {
     seqMat <- as.matrix(seqMat)
     }
     seqMat <- t(seqMat)
     allTmat <- .allTransMat(seqMat, order = order)
     freqMat <- .allFreqProbMat(seqMat)
     n <- order
     uelement <- sort(unique(as.character(seqMat)))
     m <- length(uelement)
     s <- nrow(seqMat)
     lmbda <- rep(1/(n * s), n * s * s)
     fit <- Rsolnp::solnp(pars = lmbda, fun = .fn3, eqfun = .eqn3,
     eqB = rep(1, s), LB = rep(0, n * s * s), control = list(trace = 0),
     allTmat = allTmat, freqMat = freqMat, n = n, m = m, s = s,
     Norm = Norm)
     return(new("hommc", order = order, Lambda = fit$pars, P = allTmat,
     states = uelement, byrow = FALSE))
    }
    <bytecode: 0xc5be2f0>
    <environment: namespace:markovchain>
     --- function search by body ---
    Function fitHighOrderMultivarMC in namespace markovchain has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
    --- re-building 'markvochain_crash_intro.Rmd' using rmarkdown
    --- finished re-building 'markvochain_crash_intro.Rmd'
    
    SUMMARY: processing the following files failed:
     'an_introduction_to_markovchain_package.Rmd'
     'higher_order_markov_chains.Rmd'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.8.0
Check: examples
Result: ERROR
    Running examples in ‘markovchain-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: fitHighOrderMultivarMC
    > ### Title: Function to fit Higher Order Multivariate Markov chain
    > ### Aliases: fitHighOrderMultivarMC
    >
    > ### ** Examples
    >
    > data <- matrix(c('2', '1', '3', '3', '4', '3', '2', '1', '3', '3', '2', '1',
    + c('2', '4', '4', '4', '4', '2', '3', '3', '1', '4', '3', '3')),
    + ncol = 2, byrow = FALSE)
    >
    > fitHighOrderMultivarMC(data, order = 2, Norm = 2)
    This function is experimental
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    markovchain
     --- call from context ---
    fitHighOrderMultivarMC(data, order = 2, Norm = 2)
     --- call from argument ---
    if (class(seqMat) == "data.frame") {
     seqMat <- as.matrix(seqMat)
    }
     --- R stacktrace ---
    where 1: fitHighOrderMultivarMC(data, order = 2, Norm = 2)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (seqMat, order = 2, Norm = 2)
    {
     message("This function is experimental")
     if (class(seqMat) == "data.frame") {
     seqMat <- as.matrix(seqMat)
     }
     seqMat <- t(seqMat)
     allTmat <- .allTransMat(seqMat, order = order)
     freqMat <- .allFreqProbMat(seqMat)
     n <- order
     uelement <- sort(unique(as.character(seqMat)))
     m <- length(uelement)
     s <- nrow(seqMat)
     lmbda <- rep(1/(n * s), n * s * s)
     fit <- Rsolnp::solnp(pars = lmbda, fun = .fn3, eqfun = .eqn3,
     eqB = rep(1, s), LB = rep(0, n * s * s), control = list(trace = 0),
     allTmat = allTmat, freqMat = freqMat, n = n, m = m, s = s,
     Norm = Norm)
     return(new("hommc", order = order, Lambda = fit$pars, P = allTmat,
     states = uelement, byrow = FALSE))
    }
    <bytecode: 0x5630e16aa2d0>
    <environment: namespace:markovchain>
     --- function search by body ---
    Function fitHighOrderMultivarMC in namespace markovchain has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.8.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [14s/20s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(markovchain)
     Package: markovchain
     Version: 0.8.0
     Date: 2019-09-13
     BugReport: http://github.com/spedygiorgio/markovchain/issues
    
     > test_check("markovchain")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     markovchain
     --- call from context ---
     markovchainListFit(data = myHolson)
     --- call from argument ---
     if (class(data) == "list") {
     markovchains <- list()
     freqMatrixes <- .mcListFitForList(data)
     } else {
     if (is.data.frame(data)) {
     data <- unname(as.matrix(data))
     }
     if (!byrow) {
     data <- t(data)
     }
     nCols <- ncol(data)
     freqMatrixes <- lapply(seq_len(nCols - 1), function(i) {
     matrData <- data[, c(i, i + 1)]
     matrData[1, ] <- as.character(matrData[1, ])
     validTransition <- any(apply(matrData, 1, function(x) {
     !any(is.na(x))
     }))
     if (validTransition)
     createSequenceMatrix(matrData, toRowProbs = FALSE,
     sanitize = TRUE)
     })
     freqMatrixes <- freqMatrixes[!sapply(freqMatrixes, is.null)]
     }
     --- R stacktrace ---
     where 1: markovchainListFit(data = myHolson)
     where 2: eval_bare(expr, quo_get_env(quo))
     where 3: quasi_label(enquo(object), label, arg = "object")
     where 4 at testthat/testFits.R#19: expect_equal(markovchainListFit(data = myHolson), checkmarkovchainFitList)
     where 5: eval(code, test_env)
     where 6: eval(code, test_env)
     where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 13: tryCatchList(expr, classes, parentenv, handlers)
     where 14: 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 15: test_code(desc, code, env = parent.frame())
     where 16 at testthat/testFits.R#17: test_that("Check markovchainFit & listFit", {
     expect_equal(markovchainFit(ciao), simpleMcCiaoFit)
     expect_equal(markovchainListFit(data = myHolson), checkmarkovchainFitList)
     })
     where 17: eval(code, test_env)
     where 18: eval(code, test_env)
     where 19: 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 20: doTryCatch(return(expr), name, parentenv, handler)
     where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 25: tryCatchList(expr, classes, parentenv, handlers)
     where 26: 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 27: test_code(NULL, exprs, env)
     where 28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 29: force(code)
     where 30: doWithOneRestart(return(expr), restart)
     where 31: withOneRestart(expr, restarts[[1L]])
     where 32: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 33: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 34: FUN(X[[i]], ...)
     where 35: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 36: force(code)
     where 37: doWithOneRestart(return(expr), restart)
     where 38: withOneRestart(expr, restarts[[1L]])
     where 39: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 40: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 41: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 42: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 43: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 44: test_check("markovchain")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (data, byrow = TRUE, laplacian = 0, name)
     {
     if (!any((class(data) %in% c("data.frame", "matrix", "list")))) {
     stop("Error: data must be either a matrix or a data.frame or a list")
     }
     freqMatrixes <- list()
     if (class(data) == "list") {
     markovchains <- list()
     freqMatrixes <- .mcListFitForList(data)
     }
     else {
     if (is.data.frame(data)) {
     data <- unname(as.matrix(data))
     }
     if (!byrow) {
     data <- t(data)
     }
     nCols <- ncol(data)
     freqMatrixes <- lapply(seq_len(nCols - 1), function(i) {
     matrData <- data[, c(i, i + 1)]
     matrData[1, ] <- as.character(matrData[1, ])
     validTransition <- any(apply(matrData, 1, function(x) {
     !any(is.na(x))
     }))
     if (validTransition)
     createSequenceMatrix(matrData, toRowProbs = FALSE,
     sanitize = TRUE)
     })
     freqMatrixes <- freqMatrixes[!sapply(freqMatrixes, is.null)]
     }
     if (length(freqMatrixes) == 0) {
     return(list())
     }
     markovchains <- lapply(freqMatrixes, function(freqMatrix) {
     freqMatrix <- freqMatrix + laplacian
     rSums <- rowSums(freqMatrix)
     tMatrix <- freqMatrix/rSums
     estMc <- new("markovchain", transitionMatrix = tMatrix)
     estMc
     })
     outMcList <- new("markovchainList", markovchains = markovchains)
     out <- list(estimate = outMcList)
     if (!missing(name)) {
     out$estimate@name <- name
     }
     return(out)
     }
     <bytecode: 0x5645e7b8d3f8>
     <environment: namespace:markovchain>
     --- function search by body ---
     Function markovchainListFit in namespace markovchain has this body.
     ----------- END OF FAILURE REPORT --------------
     Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.8.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘an_introduction_to_markovchain_package.Rmd’ using rmarkdown
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    Loading required package: TraMineR
    
    TraMineR stable version 2.0-13 (Built: 2019-11-25)
    Website: http://traminer.unige.ch
    Please type 'citation("TraMineR")' for citation information.
    
    Loading required package: colorspace
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    markovchain
     --- call from context ---
    verifyHomogeneity(inputList = kullback, verbose = TRUE)
     --- call from argument ---
    if (class(inputList[[i]]) == "matrix") {
     checks <- .checkMatrix4Homogeneity(inputList[[i]])
     if (!checks)
     stop("Error! Element ", i, " to be checked")
    } else {
     inputList[[i]] <- createSequenceMatrix(stringchar = inputList[[i]])
    }
     --- R stacktrace ---
    where 1: verifyHomogeneity(inputList = kullback, verbose = TRUE)
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: 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 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: 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 (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: 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 17: process_file(text, output)
    where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet,
     encoding = encoding)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: 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)
     }
    }, error = function(e) {
     OK <<- FALSE
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 26: tools:::.buildOneVignette("an_introduction_to_markovchain_package.Rmd",
     "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/markovchain.Rcheck/vign_test/markovchain",
     TRUE, FALSE, "an_introduction_to_markovchain_package", "UTF-8",
     "/home/hornik/tmp/scratch/RtmplIWTOq/file71ea5028b91c.rds")
    
     --- value of length: 2 type: logical ---
    [1] TRUE FALSE
     --- function from context ---
    function (inputList, verbose = TRUE)
    {
     warning("The accuracy of the statistical inference functions has been questioned. It will be thoroughly investigated in future versions of the package.")
     if (class(inputList) != "list")
     stop("Error! inputList should be a string")
     if (length(inputList) < 2)
     stop("Error! inputList length lower than 2")
     for (i in 1:length(inputList)) {
     if (class(inputList[[i]]) == "matrix") {
     checks <- .checkMatrix4Homogeneity(inputList[[i]])
     if (!checks)
     stop("Error! Element ", i, " to be checked")
     }
     else {
     inputList[[i]] <- createSequenceMatrix(stringchar = inputList[[i]])
     }
     }
     all.names <- character()
     for (i in 1:length(inputList)) {
     all.names <- c(all.names, rownames(inputList[[i]]))
     }
     all.names <- sort(unique(all.names))
     PooledRawTransitionMatrix <- matrix(0, nrow = length(all.names),
     ncol = length(all.names), dimnames = list(all.names,
     all.names))
     RowSumsMatrix <- matrix(0, nrow = length(inputList), ncol = length(all.names),
     dimnames = list(1:length(inputList), all.names))
     for (k in 1:length(inputList)) {
     current_support = rownames(inputList[[k]])
     current_dim = dim(inputList[[k]])
     for (i in 1:current_dim[1]) {
     for (j in 1:current_dim[2]) {
     num_trans <- inputList[[k]][i, j]
     which_row_trans <- current_support[i]
     which_col_trans <- current_support[j]
     row_to_write <- match(x = which_row_trans, table = all.names)
     col_to_write <- match(x = which_col_trans, table = all.names)
     PooledRawTransitionMatrix[row_to_write, col_to_write] = PooledRawTransitionMatrix[row_to_write,
     col_to_write] + num_trans
     }
     }
     }
     for (k in 1:length(inputList)) {
     my_row_sums <- rowSums(inputList[[k]])
     current_support = names(my_row_sums)
     for (i in 1:length(current_support)) {
     my_element <- my_row_sums[i]
     col_to_write <- match(x = current_support[i], table = all.names)
     RowSumsMatrix[k, col_to_write] <- RowSumsMatrix[k,
     col_to_write] + my_element
     }
     }
     statistic <- 0
     newInputList <- lapply(inputList, .addNamedColumns, fullnames = all.names)
     number_of_transitions <- sapply(newInputList, sum)
     total_transitions <- sum(number_of_transitions)
     for (s in 1:length(inputList)) {
     for (j in 1:length(all.names)) {
     for (k in 1:length(all.names)) {
     if (any(newInputList[[s]][j, k] == 0, number_of_transitions[s] ==
     0, PooledRawTransitionMatrix[j, k] == 0)) {
     statistic <- statistic + 0
     }
     else {
     statistic <- statistic + newInputList[[s]][j,
     k] * log((total_transitions * newInputList[[s]][j,
     k])/(number_of_transitions[s] * PooledRawTransitionMatrix[j,
     k]))
     }
     }
     }
     }
     statistic <- statistic * 2
     degrees_of_freedom <- (length(inputList) - 1) * (length(all.names)^2 -
     1)
     p.value <- 1 - pchisq(q = statistic, df = degrees_of_freedom)
     if (verbose == TRUE) {
     cat("Testing homogeneity of DTMC underlying input list \n")
     cat("ChiSq statistic is", statistic, "d.o.f are", degrees_of_freedom,
     "corresponding p-value is", p.value, "\n")
     }
     out <- list(statistic = statistic, dof = degrees_of_freedom,
     pvalue = p.value)
     return(out)
    }
    <bytecode: 0x56309277efe0>
    <environment: namespace:markovchain>
     --- function search by body ---
    Function verifyHomogeneity in namespace markovchain has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
    --- re-building ‘gsoc_2017_additions.Rmd’ using rmarkdown
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    --- finished re-building ‘gsoc_2017_additions.Rmd’
    
    --- re-building ‘higher_order_markov_chains.Rmd’ using rmarkdown
    Loading required package: markovchain
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    This function is experimental
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    markovchain
     --- call from context ---
    fitHighOrderMultivarMC(sales, order = 8, Norm = 2)
     --- call from argument ---
    if (class(seqMat) == "data.frame") {
     seqMat <- as.matrix(seqMat)
    }
     --- R stacktrace ---
    where 1: fitHighOrderMultivarMC(sales, order = 8, Norm = 2)
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: 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 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: 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 (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: 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 17: process_file(text, output)
    where 18: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet,
     encoding = encoding)
    where 19: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     ...)
    where 20: vweave_rmarkdown(...)
    where 21: engine$weave(file, quiet = quiet, encoding = enc)
    where 22: doTryCatch(return(expr), name, parentenv, handler)
    where 23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 24: tryCatchList(expr, classes, parentenv, handlers)
    where 25: 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)
     }
    }, error = function(e) {
     OK <<- FALSE
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 26: tools:::.buildOneVignette("higher_order_markov_chains.Rmd", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/markovchain.Rcheck/vign_test/markovchain",
     TRUE, FALSE, "higher_order_markov_chains", "UTF-8", "/home/hornik/tmp/scratch/RtmplIWTOq/file71ea3b17cef7.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (seqMat, order = 2, Norm = 2)
    {
     message("This function is experimental")
     if (class(seqMat) == "data.frame") {
     seqMat <- as.matrix(seqMat)
     }
     seqMat <- t(seqMat)
     allTmat <- .allTransMat(seqMat, order = order)
     freqMat <- .allFreqProbMat(seqMat)
     n <- order
     uelement <- sort(unique(as.character(seqMat)))
     m <- length(uelement)
     s <- nrow(seqMat)
     lmbda <- rep(1/(n * s), n * s * s)
     fit <- Rsolnp::solnp(pars = lmbda, fun = .fn3, eqfun = .eqn3,
     eqB = rep(1, s), LB = rep(0, n * s * s), control = list(trace = 0),
     allTmat = allTmat, freqMat = freqMat, n = n, m = m, s = s,
     Norm = Norm)
     return(new("hommc", order = order, Lambda = fit$pars, P = allTmat,
     states = uelement, byrow = FALSE))
    }
    <bytecode: 0x5586a54cacd8>
    <environment: namespace:markovchain>
     --- function search by body ---
    Function fitHighOrderMultivarMC in namespace markovchain has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
    --- re-building ‘markvochain_crash_intro.Rmd’ using rmarkdown
    --- finished re-building ‘markvochain_crash_intro.Rmd’
    
    SUMMARY: processing the following files failed:
     ‘an_introduction_to_markovchain_package.Rmd’
     ‘higher_order_markov_chains.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.8.0
Check: installed package size
Result: NOTE
     installed size is 11.1Mb
     sub-directories of 1Mb or more:
     libs 9.3Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.8.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘an_introduction_to_markovchain_package.Rmd’ using rmarkdown
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    Loading required package: TraMineR
    
    TraMineR stable version 2.0-13 (Built: 2019-11-23)
    Website: http://traminer.unige.ch
    Please type 'citation("TraMineR")' for citation information.
    
    Loading required package: colorspace
    Warning: LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    Warning: LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    --- finished re-building ‘an_introduction_to_markovchain_package.Rmd’
    
    --- re-building ‘gsoc_2017_additions.Rmd’ using rmarkdown
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    ! LaTeX Error: Environment cslreferences undefined.
    
    Error: processing vignette 'gsoc_2017_additions.Rmd' failed with diagnostics:
    Failed to compile gsoc_2017_additions.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See gsoc_2017_additions.log for more info.
    --- failed re-building ‘gsoc_2017_additions.Rmd’
    
    --- re-building ‘higher_order_markov_chains.Rmd’ using rmarkdown
    Loading required package: markovchain
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    This function is experimental
    --- finished re-building ‘higher_order_markov_chains.Rmd’
    
    --- re-building ‘markvochain_crash_intro.Rmd’ using rmarkdown
    --- finished re-building ‘markvochain_crash_intro.Rmd’
    
    SUMMARY: processing the following file failed:
     ‘gsoc_2017_additions.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.8.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘an_introduction_to_markovchain_package.Rmd’ using rmarkdown
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    Loading required package: TraMineR
    
    TraMineR stable version 2.0-13 (Built: 2019-11-24)
    Website: http://traminer.unige.ch
    Please type 'citation("TraMineR")' for citation information.
    
    Loading required package: colorspace
    Warning: LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    Warning: LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    LaTeX Warning: `h' float specifier changed to `ht'.
    --- finished re-building ‘an_introduction_to_markovchain_package.Rmd’
    
    --- re-building ‘gsoc_2017_additions.Rmd’ using rmarkdown
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    ! LaTeX Error: Environment cslreferences undefined.
    
    Error: processing vignette 'gsoc_2017_additions.Rmd' failed with diagnostics:
    Failed to compile gsoc_2017_additions.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See gsoc_2017_additions.log for more info.
    --- failed re-building ‘gsoc_2017_additions.Rmd’
    
    --- re-building ‘higher_order_markov_chains.Rmd’ using rmarkdown
    Loading required package: markovchain
    Package: markovchain
    Version: 0.8.0
    Date: 2019-09-13
    BugReport: http://github.com/spedygiorgio/markovchain/issues
    
    This function is experimental
    --- finished re-building ‘higher_order_markov_chains.Rmd’
    
    --- re-building ‘markvochain_crash_intro.Rmd’ using rmarkdown
    --- finished re-building ‘markvochain_crash_intro.Rmd’
    
    SUMMARY: processing the following file failed:
     ‘gsoc_2017_additions.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc