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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: selectFunctional
> ### Title: Grouped variable selection procedure for functional data
> ### Aliases: selectFunctional
> 
> ### ** Examples
> 
>   data(toyRegFD)
>   varSel <- selectFunctional( toyRegFD$FDlist, toyRegFD$Y, normalize=FALSE, 
+                               dimensionReductionMethod="fpca", nbasisInit=16, 
+                               verbose=FALSE, ntree=10)
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(Lmat) == "try-error") { :
  the condition has length > 1 and only the first element will be used
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
RFgroove
 --- call from context --- 
varImpGroup(object = forest, xdata = design[idxTr, survivalIndexes], 
    ngroups = i, nvarGroup = nvarGroup[varNames.iter], idxGroup = idxGroup, 
    groupsNames = varNames.iter, ...)
 --- call from argument --- 
if (class(xdata) == "data.frame") xdata <- as.matrix(xdata)
 --- R stacktrace ---
where 1: varImpGroup(object = forest, xdata = design[idxTr, survivalIndexes], 
    ngroups = i, nvarGroup = nvarGroup[varNames.iter], idxGroup = idxGroup, 
    groupsNames = varNames.iter, ...)
where 2: selectGroup(designMatrix, ydata, varNames, nvarGroup, verbose = verbose, 
    ...)
where 3: selectFunctional(toyRegFD$FDlist, toyRegFD$Y, normalize = FALSE, 
    dimensionReductionMethod = "fpca", nbasisInit = 16, verbose = FALSE, 
    ntree = 10)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (object, xdata, ngroups = length(nvarGroup), nvarGroup, 
    idxGroup, groupsNames = names(nvarGroup), normalize = (length(unique(nvarGroup)) != 
        1)) 
{
    if (is.list(idxGroup)) 
        idxGroup <- unlist(idxGroup)
    if (!is.numeric(idxGroup) | min(idxGroup) != 0) 
        stop("'idxGroup' must contain the indexes of the grouped variables starting from 0")
    if (is.null(forest <- object$forest)) 
        stop("Error: keepForest")
    if (is.null(object$inbag)) 
        stop("Error: keepInbag")
    if (class(xdata) == "data.frame") 
        xdata <- as.matrix(xdata)
    if (!is.null(groupsNames)) {
        if (length(nvarGroup) != length(groupsNames)) 
            stop("Error: length nvarGroup and groupsNames")
    }
    M <- object$ntree
    Y <- object$y
    n <- nrow(xdata)
    p <- ncol(xdata)
    if (length(nvarGroup) != ngroups) {
        stop("Error: number of groups")
    }
    xdata <- t(xdata)
    storage.mode(xdata) <- "double"
    if (is.factor(Y)) {
        obj <- .C("R_varImpGroup", varImpGroup = numeric(ngroups), 
            xdata, as.integer(Y), n = as.integer(n), p = as.integer(p), 
            ntree = as.integer(M), as.integer(aperm(forest$treemap, 
                c(2, 1, 3))), as.integer(forest$nodestatus), 
            as.double(forest$xbestsplit), as.integer(forest$bestvar), 
            as.integer(forest$nodepred), as.integer(forest$ndbigtree), 
            as.integer(forest$ncat), as.integer(forest$maxcat), 
            as.integer(length(unique(Y))), ngroups = as.integer(ngroups), 
            as.integer(nvarGroup), as.integer(max(nvarGroup)), 
            as.integer(idxGroup), as.integer(object$inbag), as.integer(forest$nrnodes), 
            PACKAGE = "RFgroove")
    }
    else {
        obj <- .C("R_varImpGroup_Reg", varImpGroup = numeric(ngroups), 
            xdata, as.double(Y), n = as.integer(n), p = as.integer(p), 
            ntree = as.integer(M), as.integer(forest$leftDaughter), 
            as.integer(forest$rightDaughter), as.integer(forest$nodestatus), 
            as.double(forest$xbestsplit), as.integer(forest$bestvar), 
            as.double(forest$nodepred), as.integer(forest$ndbigtree), 
            as.integer(forest$ncat), as.integer(max(forest$ncat)), 
            ngroups = as.integer(ngroups), as.integer(nvarGroup), 
            as.integer(max(nvarGroup)), as.integer(idxGroup), 
            as.integer(object$inbag), as.integer(forest$nrnodes), 
            PACKAGE = "RFgroove")
    }
    if (normalize) {
        IMP <- obj$varImpGroup/nvarGroup
    }
    else {
        IMP <- obj$varImpGroup
    }
    if (is.null(groupsNames)) {
        names(IMP) <- paste("Gr", 1:ngroups, sep = "")
    }
    else {
        names(IMP) <- groupsNames
    }
    class(IMP) <- "importance"
    return(IMP)
}
<bytecode: 0x78a7db0>
<environment: namespace:RFgroove>
 --- function search by body ---
Function varImpGroup in namespace RFgroove has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1