Running examples in 'pairwise-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Neoffi5
> ### Title: Polytomous example data in Rost 2004
> ### Aliases: Neoffi5
> ### Keywords: datasets
> 
> ### ** Examples
> 
> data(Neoffi5)
> dim(Neoffi5)
[1] 1000    5
> ###########
> # frequencies
> ftab(Neoffi5)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
pairwise
 --- call from context --- 
ftab(Neoffi5)
 --- call from argument --- 
if (class(X) == "data.frame") {
    X <- sapply(X, function(x) {
        if (class(x) == "factor") {
            x <- as.character(x)
        }
        else (x = x)
    })
    if (length(k) == 0) {
        k <- as.list(sort(unique((c(X)))))
    }
}
 --- R stacktrace ---
where 1: ftab(Neoffi5)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (X, catgories = NULL, na.omit = FALSE) 
{
    k <- catgories
    if (class(X) == "data.frame") {
        X <- sapply(X, function(x) {
            if (class(x) == "factor") {
                x <- as.character(x)
            }
            else (x = x)
        })
        if (length(k) == 0) {
            k <- as.list(sort(unique((c(X)))))
        }
    }
    if (is.vector(X) == TRUE) {
        X <- as.data.frame(X)
    }
    if (class(X) == "factor") {
        X <- as.data.frame(X)
    }
    if (class(X) == "matrix") {
        if (length(k) == 0) {
            k <- as.list(sort(unique((c(X)))))
        }
    }
    erg <- matrix(NA, ncol = dim(X)[2], nrow = length(k))
    i = 1
    for (i in 1:dim(X)[2]) {
        temp1 <- mapply(rep, X[, i], length(k))
        dimnames(temp1) <- NULL
        sl <- as.list(data.frame(t(temp1), stringsAsFactors = F))
        erg[, i] <- sapply(mapply(function(x, y) {
            which(x == y)
        }, sl, k, SIMPLIFY = FALSE), length)
    }
    rownames(erg) <- k
    colnames(erg) <- colnames(X)
    if (na.omit == FALSE) {
        miss <- apply(X, 2, function(x) {
            sum(is.na(x))
        })
        erg <- rbind(miss, erg)
    }
    return(erg)
}
<bytecode: 0x8799398>
<environment: namespace:pairwise>
 --- function search by body ---
Function ftab in namespace pairwise has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(X) == "data.frame") { : the condition has length > 1
Calls: ftab
Execution halted