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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: accordance
> ### Title: Accordance for cluster outcomes from different methods.
> ### Aliases: accordance
> 
> ### ** Examples
> 
> ##Generate dataset
> k <- 3
> set.seed(2511)
> ds <- sampleFuncy(obsNr=30, timeNr=10, reg=TRUE, k=k, sd=.4)
>  
> ##Cluster dataset
> res1 <- funcit(methods=1:3, data=Data(ds), k=4, clusters=Cluster(ds))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
funcy
 --- call from context --- 
funcit(methods = 1:3, data = Data(ds), k = 4, clusters = Cluster(ds))
 --- call from argument --- 
if (!(class(data) %in% c("matrix", "data.frame"))) stop(paste(data, 
    "must be given in matrix or data.frame format."))
 --- R stacktrace ---
where 1: funcit(methods = 1:3, data = Data(ds), k = 4, clusters = Cluster(ds))

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (data, k, methods = c("fitfclust", "distclust", "iterSubspace", 
    "funclust", "funHDDC", "fscm", "waveclust"), seed = NULL, 
    regTime = NULL, clusters = NULL, funcyCtrl = NULL, fpcCtrl = NULL, 
    parallel = FALSE, save.data = TRUE, ...) 
{
    if (missing(methods)) 
        stop("Please select one method or methods='ALL'.")
    else if (length(methods) == 1) 
        if (methods == "ALL") 
            methods <- 1:7
    allMethods <- c("fitfclust", "distclust", "iterSubspace", 
        "funclust", "funHDDC", "fscm", "waveclust")
    if (is.numeric(methods)) 
        usedMethods <- allMethods[methods]
    else usedMethods <- match.arg(methods, allMethods, several.ok = TRUE)
    nrMethods <- length(usedMethods)
    if (missing(k)) 
        stop(paste(k, "is missing"))
    if (!(class(data) %in% c("matrix", "data.frame"))) 
        stop(paste(data, "must be given in matrix or data.frame format."))
    chf <- checkFormat(data)
    data <- chf$data
    reg <- chf$reg
    if (is.null(funcyCtrl)) 
        funcyCtrl <- new("funcyCtrl")
    funcyCtrl@seed <- seed
    if (sum(usedMethods %in% allMethods[c(1, 3, 4, 5, 6, 7)]) > 
        0 & class(funcyCtrl) == "funcyCtrl") 
        funcyCtrl <- as(funcyCtrl, "funcyCtrlMbc")
    if (funcyCtrl@baseType != "eigenbasis" & !is.null(fpcCtrl)) 
        warning("fpcCtrl is ignored since it controls only eigenbasis.")
    else if (funcyCtrl@baseType == "eigenbasis") 
        fpcCtrl <- fpcCtrlCheck(fpcCtrl = fpcCtrl, data = data, 
            reg = reg)
    if (reg == 0 & sum(usedMethods %in% c("fscm", "funclust", 
        "funHDDC")) > 0) {
        notWork <- usedMethods[which(usedMethods %in% allMethods[-c(1:3)])]
        stop(paste("Algorithm", notWork, "works only on regular data!\n Please choose one of fitfclust, distclust or iterSubspace."))
    }
    if (nrMethods == 1) 
        parallel <- FALSE
    if (.Platform$OS.type != "unix" & parallel) {
        warning("Parallel computing is only supported on Unix platforms.")
        parallel <- FALSE
    }
    if (parallel) {
        parallelFct <- parallel::mcparallel
        coresNr <- detectCores() - 1
        options(cores = coresNr)
    }
    else {
        parallelFct <- identity
    }
    RES <- list()
    if ("fitfclust" %in% usedMethods) {
        indx <- match("fitfclust", usedMethods)
        RES[[indx]] <- parallelFct(fitfclustWrapper(data = data, 
            k = k, reg = reg, regTime = regTime, fpcCtrl = fpcCtrl, 
            funcyCtrlMbc = funcyCtrl, ...))
    }
    if ("distclust" %in% usedMethods) {
        indx <- match("distclust", usedMethods)
        RES[[indx]] <- parallelFct(distclustWrapper(data = data, 
            k = k, reg = reg, regTime = regTime, fpcCtrl = fpcCtrl, 
            funcyCtrl = funcyCtrl, ...))
    }
    if ("iterSubspace" %in% usedMethods) {
        indx <- match("iterSubspace", usedMethods)
        RES[[indx]] <- parallelFct(iterSubspaceWrapper(data = data, 
            k = k, reg = reg, regTime = regTime, fpcCtrl = fpcCtrl, 
            funcyCtrlMbc = funcyCtrl, ...))
    }
    if ("funclust" %in% usedMethods) {
        .warn_once <- local({
            not.warned.yet <- TRUE
            function(x) {
                if (not.warned.yet) {
                  warning("Funclustering is currently not available on CRAN.")
                  not.warned.yet <<- FALSE
                }
            }
        })
    }
    if ("funHDDC" %in% usedMethods) {
        if (!requireNamespace("funHDDC")) 
            stop("Please install package 'funHDDC' to use method 'funHDDC'.")
        indx <- match("funHDDC", usedMethods)
        RES[[indx]] <- parallelFct(funHDDCWrapper(data = data, 
            k = k, reg = reg, regTime = regTime, funcyCtrlMbc = funcyCtrl, 
            ...))
    }
    if ("fscm" %in% usedMethods) {
        indx <- match("fscm", usedMethods)
        RES[[indx]] <- parallelFct(fscmWrapper(data = data, k = k, 
            reg = reg, regTime = regTime, funcyCtrlMbc = funcyCtrl, 
            ...))
    }
    if ("waveclust" %in% usedMethods) {
        indx <- match("waveclust", usedMethods)
        RES[[indx]] <- parallelFct(waveclustWrapper(data = data, 
            k = k, reg = reg, regTime = regTime, funcyCtrlMbc = funcyCtrl, 
            ...))
    }
    FRES <- new("funcyOutList")
    FRES@call <- match.call()
    if (parallel) 
        FRES@models <- parallel::mccollect(RES)
    else FRES@models <- RES
    names(FRES@models) <- usedMethods
    error <- which(sapply(FRES@models, class) == "try-error")
    if (sum(error) != 0) 
        stop(paste("Method", usedMethods[error[1]], ":", attributes(FRES@models[[error[1]]])$condition$message))
    allClusters <- sapply(FRES@models, function(x) x@cluster)
    allCenters <- lapply(FRES@models, function(x) x@centers)
    names(allCenters) <- colnames(allClusters) <- usedMethods
    rI <- rIMethods(methodNames = usedMethods, cls = allClusters, 
        trueCluster = clusters)
    if (nrMethods > 1) {
        rel <- relabelMethods(methodNames = usedMethods, cls = allClusters, 
            ctrs = allCenters)
        allClusters <- rel$allClusters
        allCenters <- rel$allCenters
        for (i in 1:nrMethods) {
            FRES@models[[i]]@cluster <- allClusters[, i]
            FRES@models[[i]]@centers <- allCenters[[i]]
            FRES@models[[i]]@correctCl <- rI[i, i]
        }
    }
    smallCl <- which(apply(allClusters, 2, function(x) min(table(x))) < 
        2)
    if (length(smallCl) != 0) {
        warning(paste("Method", usedMethods[smallCl], "has clusters with less than 3 obervations!\n"), 
            immediate. = TRUE)
    }
    accord <- accordance(cls = allClusters, relabel = FALSE)
    if (save.data) 
        FRES@data <- data
    else FRES@data <- as.matrix(NULL)
    FRES@timeNr <- calcTimeNr(data, reg)
    FRES@reg <- reg
    FRES@k <- k
    FRES@methodName <- usedMethods
    FRES@allClusters <- allClusters
    FRES@randIndex <- rI
    FRES@votedCluster <- accord$votedCluster
    FRES@accordance <- accord$accordance
    return(FRES)
}
<bytecode: 0xbebe930>
<environment: namespace:funcy>
 --- function search by body ---
Function funcit in namespace funcy has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (!(class(data) %in% c("matrix", "data.frame"))) stop(paste(data,  : 
  the condition has length > 1
Calls: funcit
Execution halted