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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: one_combination
> ### Title: Generate symbolic expression for expectation
> ### Aliases: one_combination
> 
> ### ** Examples
> 
> one_combination(c(5, 0, 2, 1))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Umoments
 --- call from context --- 
all_groups(powvect)
 --- call from argument --- 
if (class(mat) != "matrix") mat <- matrix(mat, nrow = 1)
 --- R stacktrace ---
where 1: all_groups(powvect)
where 2: one_combination(c(5, 0, 2, 1))

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (powvect) 
{
    K <- length(powvect)
    m <- sum(powvect)
    groupings <- groups(m)
    perms <- perm_categories(powvect)
    excl <- paste("[^", letters[1:K], "]", sep = "")
    mat <- matrix("", ncol = m + 2)
    for (g in 1:length(groupings)) {
        grp <- groupings[[g]]
        for (p in 1:length(perms)) {
            permgroup <- substring(perms[p], c(1, cumsum(grp[-length(grp)]) + 
                1), cumsum(grp))
            if (any(permgroup == "a")) 
                next
            newrow <- sort(sapply(permgroup, sort_str))
            mat <- rbind(mat, c(newrow, rep("", m - length(newrow)), 
                length(newrow), calculate_coef(newrow, K, excl)))
        }
    }
    all_empty <- apply(mat, 2, function(s) all(s == ""))
    mat <- unique(mat[, !all_empty])[-1, ]
    if (class(mat) != "matrix") 
        mat <- matrix(mat, nrow = 1)
    colnames(mat) <- c(paste("group", 1:(ncol(mat) - 2)), "d", 
        "coef")
    return(mat)
}
<bytecode: 0x55d56d324f50>
<environment: namespace:Umoments>
 --- function search by body ---
Function all_groups in namespace Umoments has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1