CRAN Package Check Results for Package ldhmm

Last updated on 2019-12-07 14:46:46 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.4.5 10.56 95.89 106.45 ERROR
r-devel-linux-x86_64-debian-gcc 0.5.1 8.37 64.08 72.45 OK
r-devel-linux-x86_64-fedora-clang 0.5.1 117.84 OK
r-devel-linux-x86_64-fedora-gcc 0.5.1 109.61 OK
r-devel-windows-ix86+x86_64 0.4.5 23.00 124.00 147.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.4.5 22.00 135.00 157.00 OK
r-patched-linux-x86_64 0.5.1 8.02 73.29 81.31 OK
r-patched-solaris-x86 0.4.5 152.70 OK
r-release-linux-x86_64 0.5.1 8.57 72.62 81.19 OK
r-release-windows-ix86+x86_64 0.4.5 22.00 86.00 108.00 OK
r-release-osx-x86_64 0.5.1 OK
r-oldrel-windows-ix86+x86_64 0.5.1 3.00 5.00 8.00 ERROR
r-oldrel-osx-x86_64 0.5.1 OK

Check Details

Version: 0.4.5
Check: examples
Result: ERROR
    Running examples in 'ldhmm-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: ldhmm
    > ### Title: Constructor of ldhmm class
    > ### Aliases: ldhmm
    > ### Keywords: constructor
    >
    > ### ** Examples
    >
    > param0 <- matrix(c(0.003, 0.02, 1, -0.006, 0.03, 1.3), 2, 3, byrow=TRUE)
    > gamma0 <- matrix(c(0.9, 0.1, 0.1, 0.9), 2, 2, byrow=TRUE)
    > d <- ldhmm(m=2, param=param0, gamma=gamma0)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    ldhmm
     --- call from context ---
    ldhmm(m = 2, param = param0, gamma = gamma0)
     --- call from argument ---
    if (class(gamma) == "numeric") {
     if (length(gamma) != m * m)
     stop(paste("gamma is a vector, but length is not m by m:",
     length(gamma)))
     gamma <- ldhmm.gamma_init(m, prob = gamma)
    }
     --- R stacktrace ---
    where 1: ldhmm(m = 2, param = param0, gamma = gamma0)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (m, param, gamma, delta = NULL, stationary = TRUE, mle.optimizer = "nlm")
    {
     call <- match.call()
     param.nbr <- NCOL(param)
     if (length(m) != 1 | m%%1 != 0)
     stop("m must be an integer")
     if (param.nbr%%1 != 0)
     stop("param.nbr must be integer")
     if (param.nbr != 2 & param.nbr != 3)
     stop("param.nbr must be 2 or 3")
     if (NROW(param) != m)
     stop("param must have m rows")
     if (stationary == FALSE) {
     if (length(delta) != m)
     stop("delta must be length-m vector when stationary is not true")
     }
     if (class(gamma) == "numeric") {
     if (length(gamma) != m * m)
     stop(paste("gamma is a vector, but length is not m by m:",
     length(gamma)))
     gamma <- ldhmm.gamma_init(m, prob = gamma)
     }
     if (NROW(gamma) != m | NCOL(gamma) != m)
     stop("gamma must be mxm matrix")
     if (param.nbr == 2)
     colnames(param) <- c("mu", "sigma")
     if (param.nbr == 3)
     colnames(param) <- c("mu", "sigma", "lambda")
     d <- new("ldhmm", call = call, m = unname(m), param.nbr = param.nbr,
     param = param, gamma = gamma, delta = delta, stationary = stationary,
     mle.optimizer = mle.optimizer)
     invisible(d)
    }
    <bytecode: 0x32eee68>
    <environment: namespace:ldhmm>
     --- function search by body ---
    Function ldhmm in namespace ldhmm has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(gamma) == "numeric") { : the condition has length > 1
    Calls: ldhmm
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.4.5
Check: tests
Result: ERROR
     Running 'testthat.R' [7s/8s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     >
     > library(testthat)
     > library(ecd)
     > library(ldhmm)
     > test_check("ldhmm")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     ldhmm
     --- call from context ---
     ldhmm(m = m, param = param0, gamma = gamma0, delta = delta0)
     --- call from argument ---
     if (class(gamma) == "numeric") {
     if (length(gamma) != m * m)
     stop(paste("gamma is a vector, but length is not m by m:",
     length(gamma)))
     gamma <- ldhmm.gamma_init(m, prob = gamma)
     }
     --- R stacktrace ---
     where 1 at testthat/test-forecast-ldhmm.R#20: ldhmm(m = m, param = param0, gamma = gamma0, delta = delta0)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(NULL, exprs, env)
     where 13: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 14: force(code)
     where 15: doWithOneRestart(return(expr), restart)
     where 16: withOneRestart(expr, restarts[[1L]])
     where 17: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 18: 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 19: FUN(X[[i]], ...)
     where 20: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 21: force(code)
     where 22: doWithOneRestart(return(expr), restart)
     where 23: withOneRestart(expr, restarts[[1L]])
     where 24: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 25: 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 26: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 27: 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 28: 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 29: test_check("ldhmm")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (m, param, gamma, delta = NULL, stationary = TRUE, mle.optimizer = "nlm")
     {
     call <- match.call()
     param.nbr <- NCOL(param)
     if (length(m) != 1 | m%%1 != 0)
     stop("m must be an integer")
     if (param.nbr%%1 != 0)
     stop("param.nbr must be integer")
     if (param.nbr != 2 & param.nbr != 3)
     stop("param.nbr must be 2 or 3")
     if (NROW(param) != m)
     stop("param must have m rows")
     if (stationary == FALSE) {
     if (length(delta) != m)
     stop("delta must be length-m vector when stationary is not true")
     }
     if (class(gamma) == "numeric") {
     if (length(gamma) != m * m)
     stop(paste("gamma is a vector, but length is not m by m:",
     length(gamma)))
     gamma <- ldhmm.gamma_init(m, prob = gamma)
     }
     if (NROW(gamma) != m | NCOL(gamma) != m)
     stop("gamma must be mxm matrix")
     if (param.nbr == 2)
     colnames(param) <- c("mu", "sigma")
     if (param.nbr == 3)
     colnames(param) <- c("mu", "sigma", "lambda")
     d <- new("ldhmm", call = call, m = unname(m), param.nbr = param.nbr,
     param = param, gamma = gamma, delta = delta, stationary = stationary,
     mle.optimizer = mle.optimizer)
     invisible(d)
     }
     <bytecode: 0x65a29a8>
     <environment: namespace:ldhmm>
     --- function search by body ---
     Function ldhmm in namespace ldhmm has this body.
     Function ldhmm in namespace ldhmm has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 1. Error: (unknown) (@test-forecast-ldhmm.R#20) ----------------------------
     the condition has length > 1
     Backtrace:
     1. ldhmm::ldhmm(m = m, param = param0, gamma = gamma0, delta = delta0)
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     ldhmm
     --- call from context ---
     ldhmm(m = m, param = param0, gamma = gamma0, delta = delta0)
     --- call from argument ---
     if (class(gamma) == "numeric") {
     if (length(gamma) != m * m)
     stop(paste("gamma is a vector, but length is not m by m:",
     length(gamma)))
     gamma <- ldhmm.gamma_init(m, prob = gamma)
     }
     --- R stacktrace ---
     where 1 at testthat/test-ldhmm.R#20: ldhmm(m = m, param = param0, gamma = gamma0, delta = delta0)
     where 2: eval(code, test_env)
     where 3: eval(code, test_env)
     where 4: 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 5: doTryCatch(return(expr), name, parentenv, handler)
     where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 8: doTryCatch(return(expr), name, parentenv, handler)
     where 9: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 10: tryCatchList(expr, classes, parentenv, handlers)
     where 11: 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 12: test_code(NULL, exprs, env)
     where 13: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 14: force(code)
     where 15: doWithOneRestart(return(expr), restart)
     where 16: withOneRestart(expr, restarts[[1L]])
     where 17: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 18: 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 19: FUN(X[[i]], ...)
     where 20: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 21: force(code)
     where 22: doWithOneRestart(return(expr), restart)
     where 23: withOneRestart(expr, restarts[[1L]])
     where 24: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 25: 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 26: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 27: 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 28: 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 29: test_check("ldhmm")
    
     --- value of length: 2 type: logical ---
     [1] FALSE FALSE
     --- function from context ---
     function (m, param, gamma, delta = NULL, stationary = TRUE, mle.optimizer = "nlm")
     {
     call <- match.call()
     param.nbr <- NCOL(param)
     if (length(m) != 1 | m%%1 != 0)
     stop("m must be an integer")
     if (param.nbr%%1 != 0)
     stop("param.nbr must be integer")
     if (param.nbr != 2 & param.nbr != 3)
     stop("param.nbr must be 2 or 3")
     if (NROW(param) != m)
     stop("param must have m rows")
     if (stationary == FALSE) {
     if (length(delta) != m)
     stop("delta must be length-m vector when stationary is not true")
     }
     if (class(gamma) == "numeric") {
     if (length(gamma) != m * m)
     stop(paste("gamma is a vector, but length is not m by m:",
     length(gamma)))
     gamma <- ldhmm.gamma_init(m, prob = gamma)
     }
     if (NROW(gamma) != m | NCOL(gamma) != m)
     stop("gamma must be mxm matrix")
     if (param.nbr == 2)
     colnames(param) <- c("mu", "sigma")
     if (param.nbr == 3)
     colnames(param) <- c("mu", "sigma", "lambda")
     d <- new("ldhmm", call = call, m = unname(m), param.nbr = param.nbr,
     param = param, gamma = gamma, delta = delta, stationary = stationary,
     mle.optimizer = mle.optimizer)
     invisible(d)
     }
     <bytecode: 0x65a29a8>
     <environment: namespace:ldhmm>
     --- function search by body ---
     Function ldhmm in namespace ldhmm has this body.
     ----------- END OF FAILURE REPORT --------------
     -- 2. Error: (unknown) (@test-ldhmm.R#20) -------------------------------------
     the condition has length > 1
     Backtrace:
     1. ldhmm::ldhmm(m = m, param = param0, gamma = gamma0, delta = delta0)
    
     == testthat results ===========================================================
     [ OK: 0 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
     1. Error: (unknown) (@test-forecast-ldhmm.R#20)
     2. Error: (unknown) (@test-ldhmm.R#20)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.5.1
Check: whether package can be installed
Result: ERROR
    Installation failed.
Flavor: r-oldrel-windows-ix86+x86_64