CRAN Package Check Results for Package ramps

Last updated on 2019-12-06 00:50:07 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.6-15 10.99 88.99 99.98 ERROR
r-devel-linux-x86_64-debian-gcc 0.6-15 10.67 68.15 78.82 OK
r-devel-linux-x86_64-fedora-clang 0.6-15 112.92 OK
r-devel-linux-x86_64-fedora-gcc 0.6-15 113.25 OK
r-devel-windows-ix86+x86_64 0.6-15 19.00 123.00 142.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.6-15 19.00 131.00 150.00 OK
r-patched-linux-x86_64 0.6-15 10.08 78.86 88.94 OK
r-patched-solaris-x86 0.6-15 155.50 OK
r-release-linux-x86_64 0.6-15 9.67 79.26 88.93 OK
r-release-windows-ix86+x86_64 0.6-15 26.00 89.00 115.00 OK
r-release-osx-x86_64 0.6-15 OK
r-oldrel-windows-ix86+x86_64 0.6-15 14.00 85.00 99.00 OK
r-oldrel-osx-x86_64 0.6-15 OK

Check Details

Version: 0.6-15
Check: examples
Result: ERROR
    Running examples in 'ramps-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: param
    > ### Title: Initialization of georamps Model Parameters
    > ### Aliases: param
    > ### Keywords: models
    >
    > ### ** Examples
    >
    > ## Initial values for a flat prior
    > param(rep(0, 2), "flat")
    $init
    [1] 0 0
    
    $prior
    [1] "flat"
    
    attr(,"class")
    [1] "param"
    >
    > ## Random generation of initial values for an inverse-gamma prior
    > param(rep(NA, 2), "invgamma", shape = 2.0, scale = 0.1)
    $init
    [1] 0.05941147 0.03873818
    
    $prior
    [1] "invgamma"
    
    $shape
    [1] 2 2
    
    $scale
    [1] 0.1 0.1
    
    attr(,"class")
    [1] "param"
    >
    > ## Independent normal priors
    > param(rep(0, 2), "normal", mean = c(0, 0), variance = c(100, 100))
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    ramps
     --- call from context ---
    param(rep(0, 2), "normal", mean = c(0, 0), variance = c(100,
     100))
     --- call from argument ---
    if (class(val) == "try-error") stop("Normal variance hyperparameter must be positive definite")
     --- R stacktrace ---
    where 1: param(rep(0, 2), "normal", mean = c(0, 0), variance = c(100,
     100))
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (init, prior = c("flat", "invgamma", "normal", "uniform",
     "user"), tuning, ...)
    {
     retval <- list(init = NULL)
     retval$prior <- match.arg(prior)
     hyper <- list(...)
     n <- length(init)
     switch(retval$prior, flat = {
     }, invgamma = {
     if (!is.numeric(hyper$shape) || hyper$shape <= 0) stop("Inverse gamma shape hyperparameter must be numeric > 0")
     if (!is.numeric(hyper$scale) || hyper$scale <= 0) stop("Inverse gamma scale hyperparameter must be numeric > 0")
     retval$shape <- rep(hyper$shape, length.out = n)
     retval$scale <- rep(hyper$scale, length.out = n)
     if (any(na <- is.na(init))) init[na] <- 1/rgamma(sum(na),
     retval$shape[na]/retval$scale[na], 1)
     if (any(init <= 0)) stop("Initial values must be > 0")
     }, normal = {
     if (!is.numeric(hyper$mean)) stop("Normal mean hyperparameter must be numeric")
     if (!is.numeric(hyper$var)) stop("Normal variance hyperparameter must be numeric")
     retval$mean <- rep(hyper$mean, length.out = n)
     if (is.matrix(hyper$var)) {
     val <- hyper$var
     } else {
     val <- diag(n)
     diag(val) <- rep(hyper$var, length.out = n)
     }
     if (any(dim(val) != n)) stop("Non-comformable normal variance matrix")
     val <- try(chol(val))
     if (class(val) == "try-error") stop("Normal variance hyperparameter must be positive definite")
     retval$precision <- chol2inv(val)
     if (any(na <- is.na(init))) init[na] <- (retval$mean +
     val %*% rnorm(n))[na]
     }, uniform = {
     if (!is.numeric(hyper$min)) stop("Uniform min hyperparameter must be numeric")
     if (!is.numeric(hyper$max)) stop("Uniform max hyperparameter must be numeric")
     if (any(hyper$min >= hyper$max)) stop("Uniform min hyperparameter must be < max")
     retval$min <- rep(hyper$min, length.out = n)
     retval$max <- rep(hyper$max, length.out = n)
     if (any(na <- is.na(init))) init[na] <- runif(sum(na),
     retval$min[na], retval$max[na])
     if (any(init <= retval$min, init >= retval$max)) stop("Initial values must be contained in (min, max)")
     }, user = {
     if (!is.function(hyper$f)) stop("User-specified prior function f must be supplied")
     retval$f <- hyper$f
     val <- try(retval$f(init))
     if (length(val) != 1 || !is.finite(val) || val <= 0) stop("Prior function f(init) must evaluate to a positive number")
     })
     if (!all(is.finite(init)))
     stop("Initial values must be numeric")
     retval$init <- init
     if (!missing(tuning)) {
     if (!all(is.finite(tuning)))
     stop("Tuning values must be numeric")
     retval$tuning <- rep(tuning, length.out = n)
     }
     structure(retval, class = "param")
    }
    <bytecode: 0x8c2c598>
    <environment: namespace:ramps>
     --- function search by body ---
    Function param in namespace ramps has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang