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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plotICC
> ### Title: Plot item characteristic curves (ICCs)
> ### Aliases: plotICC
> 
> ### ** Examples
> 
> # For GUM:
> # Generate data
> #   (toy example: Too few items (due to computation time constraints) for 
> #   accurate estimation of person parameters; larger number of items is 
> #   required in practice):
> gen1 <- GenData.GGUM(400, 5, 3, "GUM", seed = 139)
> # Fit the GUM:
> fit1 <- GUM(gen1$data, 3)
Warning in if (class(m.inv.r) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(w) == "try-error") { :
  the condition has length > 1 and only the first element will be used

|-                                                           |
|--                                                          |
|---                                                         |
|----                                                        |
|-----                                                       |
|------                                                      |
|-------                                                     |
|--------                                                    |
|---------                                                   |
|----------                                                  |
|-----------                                                 |
|------------                                                |
|-------------                                               |

> th1  <- Theta.EAP(fit1)
> # Plot ICCs:
> plotICC(fit1, th1, items = 1, quiet = TRUE)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
GGUM
 --- call from context --- 
plotICC(fit1, th1, items = 1, quiet = TRUE)
 --- call from argument --- 
if (class(Th) == "matrix") Th[, "Theta"] else Th
 --- R stacktrace ---
where 1: plotICC(fit1, th1, items = 1, quiet = TRUE)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (IP, Th, items = NULL, quiet = FALSE) 
{
    Sanity.class(IP)
    C <- IP$C
    M <- 2 * C + 1
    C.max <- max(C)
    I <- ncol(IP$data)
    N <- nrow(IP$data)
    alpha <- IP$alpha
    delta <- IP$delta
    taus <- IP$taus
    theta <- if (class(Th) == "matrix") 
        Th[, "Theta"]
    else Th
    OBS.scores <- IP$data
    theta.exp <- seq(min(-4, min(theta, na.rm = TRUE)), max(4, 
        max(theta, na.rm = TRUE)), length.out = 1000)
    N.groups <- 50
    int.lims <- quantile(theta.exp, probs = seq(0, 1, 1/(N.groups - 
        1)))
    names(int.lims) <- NULL
    scores.mat <- matrix(0, nrow = I, ncol = C.max + 1)
    for (i in 1:I) {
        scores.mat[i, 1:(C[i] + 1)] <- 0:C[i]
    }
    scores.arr <- aperm(array(rep(scores.mat, N.groups), dim = c(I, 
        C.max + 1, N.groups)), c(3, 1, 2))
    EXP.scores <- apply(P.izf(alpha, delta, taus, int.lims, C) * 
        scores.arr, 1:2, sum)
    res <- list(th = int.lims, observed = matrix(NA, N.groups, 
        I), expected = EXP.scores)
    for (int in 1:N.groups) {
        pos.obs <- which((theta >= int.lims[int]) & (theta < 
            int.lims[int + 1]))
        if (length(pos.obs) > 0) {
            res[[2]][int, ] <- colMeans(OBS.scores[pos.obs, , 
                drop = FALSE], na.rm = TRUE)
        }
    }
    if (is.null(items)) {
        I.plot <- 1:I
    }
    else {
        I.plot <- items
    }
    for (i in 1:length(I.plot)) {
        it <- I.plot[i]
        if (!quiet) 
            invisible(readline(prompt = "Press [enter] to continue"))
        par(mar = c(6, 4.5, 1.5, 0.5))
        plot(res[[1]], res[[3]][, it], type = "l", lty = 1, lwd = 2, 
            xlim = c(theta.exp[1], theta.exp[1000]), ylim = c(0, 
                ceiling(max(res[[3]][, it], na.rm = TRUE))), 
            xaxt = "n", xlab = "", yaxt = "n", ylab = "", main = paste0("ICC (Item", 
                it, ")"))
        points(res[[1]], res[[2]][, it], type = "p", pch = 21, 
            bg = "grey")
        axis(1, at = seq(floor(theta.exp[1]), ceiling(theta.exp[1000]), 
            1))
        axis(2, at = seq(0, ceiling(max(res[[3]][, it], na.rm = TRUE)), 
            1), las = 1)
        mtext(expression(theta), side = 1, line = 2.5, cex = 1.2)
        mtext("Item Score", side = 2, line = 2.5, cex = 1.2)
        par(fig = c(0, 1, 0, 1), oma = c(0, 0, 0, 0), mar = c(0, 
            4.5, 0, 0.5), new = TRUE)
        plot(0, type = "n", axes = F, xlab = "", ylab = "")
        legend("bottom", c("Expected", "Observed"), col = "black", 
            lty = c(1, NA), pch = c(NA, 21), pt.bg = "grey", 
            lwd = c(2, 1), inset = 0.01, cex = 0.8, pt.cex = 1, 
            horiz = TRUE, bg = "gray95")
    }
    scores.arr.N <- aperm(array(rep(scores.mat, N), dim = c(I, 
        C.max + 1, N)), c(3, 1, 2))
    EXP.scores.N <- apply(P.izf(alpha, delta, taus, theta, C) * 
        scores.arr.N, 1:2, sum)
    cor.OBS.EXP <- round(diag(cor(OBS.scores, EXP.scores.N, use = "pairwise.complete.obs")), 
        4)
    names(cor.OBS.EXP) <- paste0("Item", 1:I)
    cat("\n")
    invisible(cbind(Theta = res[[1]], ICC.obs = res[[2]][, I.plot], 
        ICC.exp = res[[3]][, I.plot]))
}
<bytecode: 0x55eddb558c90>
<environment: namespace:GGUM>
 --- function search by body ---
Function plotICC in namespace GGUM has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1