Running examples in ‘sensR-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: clm2twoAC
> ### Title: Extract 2-AC coefficient table from a cumulative link model
> ### Aliases: clm2twoAC
> ### Keywords: models
> 
> ### ** Examples
> 
> 
> ## Example of a simple 2-AC model. First the conventional way:
> twoAC(c(2, 2, 6))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
sensR
 --- call from context --- 
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
 --- call from argument --- 
if (class(vcov) != "try-error") {
    makeWarn <- TRUE
    res$coefficients[, 2] <- sqrt(diag(vcov))
    res$vcov <- vcov
}
 --- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (data, vcov = TRUE, warn = TRUE) 
{
    vcov <- as.logical(vcov)
    stopifnot(is.logical(vcov))
    nll <- function(par) {
        tau <- par[1]
        d.prime <- par[2]
        p1 <- pnorm(-tau, d.prime, sqrt(2))
        p12 <- pnorm(tau, d.prime, sqrt(2))
        prob <- c(p1, p12 - p1, 1 - p12)
        prob[prob <= 0] <- 1
        -sum(data * log(prob))
    }
    x <- data
    if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
        tau <- 0
        d.prime <- -Inf
    }
    else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
        tau <- NA
        d.prime <- NA
    }
    else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
        tau <- 0
        d.prime <- Inf
    }
    else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
        d.prime <- -Inf
        tau <- NA
    }
    else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
        d.prime <- Inf
        tau <- NA
    }
    else {
        prob <- data/sum(data)
        gamma <- cumsum(prob)[-3]
        z <- qnorm(gamma) * sqrt(2)
        tau <- (z[2] - z[1])/2
        d.prime <- -z[1] - tau
    }
    prob <- data/sum(data)
    prob[prob <= 0] <- 1
    logLikMax <- sum(data * log(prob))
    coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"), 
        c("Estimate", "Std. Error")))
    coef[, 1] <- c(tau, d.prime)
    res <- list(coefficients = coef, data = data, logLik = logLikMax)
    if (vcov) {
        makeWarn <- TRUE
        if (all(is.finite(coef[, 1])) && tau > 0) {
            makeWarn <- FALSE
            hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson", 
                method.args = list())
            vcov <- try(solve(hess), silent = TRUE)
            if (class(vcov) != "try-error") {
                makeWarn <- TRUE
                res$coefficients[, 2] <- sqrt(diag(vcov))
                res$vcov <- vcov
            }
        }
        if (warn && makeWarn) 
            warning("vcov and standard errors are not available", 
                call. = FALSE)
    }
    return(res)
}
<bytecode: 0x55dfa2290200>
<environment: namespace:sensR>
 --- function search by body ---
Function estimate.2AC in namespace sensR has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1