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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: prunk
> ### Title: unknown relationships
> ### Aliases: prunk
> 
> ### ** Examples
> 
> data(adv); data(advpres)
> x <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date, presence = advpres)
> prunk(x, c("2010-01-01", "2010-01-15"))
     pu.all   dyads.all    pu.cores dyads.cores 
      0.524      21.000       0.524      21.000 
> mat <- creatematrix(x, c("2010-01-01", "2010-01-15"))
> prunk(mat)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
EloRating
 --- call from context --- 
prunk(mat)
 --- call from argument --- 
if (class(eloobject) == "elo") {
    xd <- eloobject$logtable
    xd$Date <- as.Date(eloobject$truedates[xd[, 1]])
    pres <- data.frame(Date = eloobject$truedates, eloobject$pmat)
    pres2 <- eloobject$pmat
    if (is.null(daterange[1])) {
        daterange <- c(min(xd$Date), max(xd$Date))
    }
    else {
        daterange <- as.Date(daterange)
    }
    xd <- xd[xd$Date <= daterange[2] & xd$Date >= daterange[1], 
        ]
    pres2 <- pres2[pres$Date <= daterange[2] & pres$Date >= daterange[1], 
        ]
    pres <- pres[pres$Date <= daterange[2] & pres$Date >= daterange[1], 
        ]
    if (0 %in% colSums(pres2)) {
        pres2 <- pres2[, -c(which(colSums(pres2) == 0))]
        ids <- colnames(pres2)
        pres <- pres[, c("Date", ids)]
    }
    startval <- as.numeric(eloobject$misc["startvalue"])
    kval <- as.numeric(eloobject$misc["k"])
    init <- as.character(eloobject$misc["init"])
    eloobject <- elo.seq(xd$winner, xd$loser, xd$Date, draw = xd$draw, 
        presence = pres, startvalue = startval, k = kval, init = init, 
        progressbar = F, runcheck = F)
    mat <- creatematrix(eloobject, drawmethod = "omit")
    if (length(intersect(colnames(pres2), colnames(mat))) < length(colnames(pres2))) {
        add <- colnames(pres2)[which(!colnames(pres2) %in% colnames(mat))]
        for (i in 1:length(add)) {
            mat <- cbind(mat, 0)
            colnames(mat)[ncol(mat)] <- add[i]
            mat <- rbind(mat, 0)
            rownames(mat)[nrow(mat)] <- add[i]
        }
    }
    mat2 <- mat
    co <- cbind(t(combn(colnames(mat), 2)), NA)
    for (i in 1:nrow(co)) {
        if (max(rowSums(pres[, co[i, 1:2]])) < 2) {
            mat2[co[i, 1], co[i, 2]] <- mat2[co[i, 2], co[i, 
                1]] <- NA
        }
    }
    res <- mat[upper.tri(mat, diag = FALSE)] + t(mat)[upper.tri(t(mat), 
        diag = FALSE)]
    N <- length(res)
    pu <- length(which(res == 0))/N
    res <- na.omit(mat2[upper.tri(mat2, diag = FALSE)] + t(mat2)[upper.tri(t(mat2), 
        diag = FALSE)])
    N2 <- length(res)
    pup <- length(which(res == 0))/N2
    res <- c(round(pu, 3), N, round(pup, 3), N2)
    names(res) <- c("pu.all", "dyads.all", "pu.cores", "dyads.cores")
}
 --- R stacktrace ---
where 1: prunk(mat)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (eloobject, daterange = NULL) 
{
    if (class(eloobject) == "elo") {
        xd <- eloobject$logtable
        xd$Date <- as.Date(eloobject$truedates[xd[, 1]])
        pres <- data.frame(Date = eloobject$truedates, eloobject$pmat)
        pres2 <- eloobject$pmat
        if (is.null(daterange[1])) {
            daterange <- c(min(xd$Date), max(xd$Date))
        }
        else {
            daterange <- as.Date(daterange)
        }
        xd <- xd[xd$Date <= daterange[2] & xd$Date >= daterange[1], 
            ]
        pres2 <- pres2[pres$Date <= daterange[2] & pres$Date >= 
            daterange[1], ]
        pres <- pres[pres$Date <= daterange[2] & pres$Date >= 
            daterange[1], ]
        if (0 %in% colSums(pres2)) {
            pres2 <- pres2[, -c(which(colSums(pres2) == 0))]
            ids <- colnames(pres2)
            pres <- pres[, c("Date", ids)]
        }
        startval <- as.numeric(eloobject$misc["startvalue"])
        kval <- as.numeric(eloobject$misc["k"])
        init <- as.character(eloobject$misc["init"])
        eloobject <- elo.seq(xd$winner, xd$loser, xd$Date, draw = xd$draw, 
            presence = pres, startvalue = startval, k = kval, 
            init = init, progressbar = F, runcheck = F)
        mat <- creatematrix(eloobject, drawmethod = "omit")
        if (length(intersect(colnames(pres2), colnames(mat))) < 
            length(colnames(pres2))) {
            add <- colnames(pres2)[which(!colnames(pres2) %in% 
                colnames(mat))]
            for (i in 1:length(add)) {
                mat <- cbind(mat, 0)
                colnames(mat)[ncol(mat)] <- add[i]
                mat <- rbind(mat, 0)
                rownames(mat)[nrow(mat)] <- add[i]
            }
        }
        mat2 <- mat
        co <- cbind(t(combn(colnames(mat), 2)), NA)
        for (i in 1:nrow(co)) {
            if (max(rowSums(pres[, co[i, 1:2]])) < 2) {
                mat2[co[i, 1], co[i, 2]] <- mat2[co[i, 2], co[i, 
                  1]] <- NA
            }
        }
        res <- mat[upper.tri(mat, diag = FALSE)] + t(mat)[upper.tri(t(mat), 
            diag = FALSE)]
        N <- length(res)
        pu <- length(which(res == 0))/N
        res <- na.omit(mat2[upper.tri(mat2, diag = FALSE)] + 
            t(mat2)[upper.tri(t(mat2), diag = FALSE)])
        N2 <- length(res)
        pup <- length(which(res == 0))/N2
        res <- c(round(pu, 3), N, round(pup, 3), N2)
        names(res) <- c("pu.all", "dyads.all", "pu.cores", "dyads.cores")
    }
    if (class(eloobject) == "matrix") {
        up <- eloobject[upper.tri(eloobject)]
        lo <- t(eloobject)[upper.tri(eloobject)]
        res <- c(round(sum(up + lo == 0)/length(lo), 3), length(lo), 
            NA, NA)
        names(res) <- c("pu.all", "dyads.all", "pu.cores", "dyads.cores")
    }
    return(res)
}
<bytecode: 0x564129bb9bd8>
<environment: namespace:EloRating>
 --- function search by body ---
Function prunk in namespace EloRating has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1