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: 0x558f4df63e40>
<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