CRAN Package Check Results for Package tsutils

Last updated on 2019-12-15 05:47:57 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.9.0 9.03 68.75 77.78 ERROR
r-devel-linux-x86_64-debian-gcc 0.9.0 8.51 49.96 58.47 OK
r-devel-linux-x86_64-fedora-clang 0.9.0 93.04 OK
r-devel-linux-x86_64-fedora-gcc 0.9.0 90.58 OK
r-devel-windows-ix86+x86_64 0.9.0 23.00 117.00 140.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.9.0 20.00 124.00 144.00 OK
r-patched-linux-x86_64 0.9.0 8.66 57.34 66.00 OK
r-patched-solaris-x86 0.9.0 118.10 OK
r-release-linux-x86_64 0.9.0 8.86 57.70 66.56 OK
r-release-windows-ix86+x86_64 0.9.0 17.00 73.00 90.00 OK
r-release-osx-x86_64 0.9.0 OK
r-oldrel-windows-ix86+x86_64 0.9.0 12.00 75.00 87.00 OK
r-oldrel-osx-x86_64 0.9.0 OK

Check Details

Version: 0.9.0
Check: examples
Result: ERROR
    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: 0x473c518>
    <environment: namespace:tsutils>
     --- function search by body ---
    Function abc in namespace tsutils has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (sum(dim(x) == 1) > 0 | class(x) == "numeric") { :
     the condition has length > 1
    Calls: abc
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang