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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: abc
> ### Title: ABC analysis
> ### Aliases: abc plot.abc
> ### Keywords: ts
> 
> ### ** Examples
> 
> x <- abs(matrix(cumsum(rnorm(5400,0,1)),36,150))
> z <- abc(x)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
tsutils
 --- call from context --- 
abc(x)
 --- call from argument --- 
if (sum(dim(x) == 1) > 0 | class(x) == "numeric") {
    x.mean <- x
} else {
    x.mean <- colMeans(x, na.rm = TRUE)
}
 --- R stacktrace ---
where 1: abc(x)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, prc = c(0.2, 0.3, 0.5)) 
{
    if (sum(dim(x) == 1) > 0 | class(x) == "numeric") {
        x.mean <- x
    }
    else {
        x.mean <- colMeans(x, na.rm = TRUE)
    }
    x.rank <- order(x.mean, decreasing = TRUE)
    x.sort <- x.mean[x.rank]
    x.sort <- (x.sort/sum(x.sort)) * 100
    n <- length(x.mean)
    k <- length(prc)
    p <- array(0, c(k, 1))
    x.ind <- array(k, c(1, n))
    x.class <- array(NA, c(1, n))
    nam.abc <- LETTERS[1:k]
    x.imp <- array(0, c(k, 1), dimnames = list(nam.abc, "Importance"))
    for (i in 1:k) {
        p[i] <- round(n * prc[i])
        if (i == 1) {
            x.ind[x.rank[1:p[i]]] <- i
            x.imp[i] <- sum(x.sort[1:sum(p[1:i])])
        }
        else if (i != k) {
            x.ind[x.rank[(sum(p[1:(i - 1)]) + 1):sum(p[1:i])]] <- i
            x.imp[i] <- sum(x.sort[1:sum(p[1:i])]) - sum(x.imp[1:(i - 
                1)])
        }
        else {
            p[i] <- n - sum(p[1:(i - 1)])
            x.imp[i] <- sum(x.sort[1:sum(p[1:i])]) - sum(x.imp[1:(i - 
                1)])
        }
        x.class[x.ind == i] <- nam.abc[i]
    }
    names(prc) <- nam.abc
    return(structure(list(type = "ABC", prc = prc, value = x.mean, 
        class = x.class, rank = x.rank, conc = x.imp), class = "abc"))
}
<bytecode: 0x55accc201908>
<environment: namespace:tsutils>
 --- function search by body ---
Function abc in namespace tsutils has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1