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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: S2CFA
> ### Title: Configural Frequencies Analysis for two Samples.
> ### Aliases: S2CFA
> 
> ### ** Examples
> 
> #######################################
> ############### some examples #########
> ######### example from Marks Textbook
> data(Lienert1978)
> res1 <- S2CFA(Lienert1978)
> summary(res1)
results of local tests:  
discriminating Type (+) / not discriminating Type (.) based on: ex.fisher.test ; Bonferoni adj. alpha: 0.008333333 
   pat. disc.Type T.exp. T.obs. C.exp. C.obs. ex.fisher.test    Chi df  pChi
1   + +         .    5.0      6    5.0      4          0.223  0.554  1 0.457
3   + =         +    8.5      3    8.5     14          0.000 13.486  1 0.000
5   o +         .    2.0      4    2.0      0          0.052  4.500  1 0.034
7   o =         .    1.0      2    1.0      0          0.243  2.118  1 0.146
9   - +         .    0.0      0    0.0      0          1.000    NaN  1   NaN
11  - =         .    1.5      3    1.5      0          0.114  3.273  1 0.070
> res2 <- S2CFA(Lienert1978, ccor=TRUE) # with continuity correction
> summary(res2)
results of local tests:  
discriminating Type (+) / not discriminating Type (.) based on: ex.fisher.test ; Bonferoni adj. alpha: 0.008333333 
   pat. disc.Type T.exp. T.obs. C.exp. C.obs. ex.fisher.test    Chi df  pChi
1   + +         .    5.0      6    5.0      4          0.223  0.138  1 0.710
3   + =         +    8.5      3    8.5     14          0.000 11.146  1 0.001
5   o +         .    2.0      4    2.0      0          0.052  2.531  1 0.112
7   o =         .    1.0      2    1.0      0          0.243  0.529  1 0.467
9   - +         .    0.0      0    0.0      0          1.000    NaN  1   NaN
11  - =         .    1.5      3    1.5      0          0.114  1.455  1 0.228
> ######### example with biger numbers
> data(suicide)
> ftab(suicide) # 'Epoche' may divide the sample into 2 subsamples  
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
confreq
 --- call from context --- 
ftab(suicide)
 --- call from argument --- 
if (class(X) == "factor") {
    X <- as.data.frame(X)
}
 --- R stacktrace ---
where 1: ftab(suicide)

 --- 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: 0x4071f28>
<environment: namespace:confreq>
 --- function search by body ---
Function ftab in namespace confreq has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(X) == "factor") { : the condition has length > 1
Calls: ftab
Execution halted