CRAN Package Check Results for Package segmented

Last updated on 2019-11-26 00:52:11 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0-0 10.69 52.96 63.65 ERROR
r-devel-linux-x86_64-debian-gcc 1.0-0 9.73 39.92 49.65 ERROR
r-devel-linux-x86_64-fedora-clang 1.0-0 82.38 OK
r-devel-linux-x86_64-fedora-gcc 1.0-0 81.38 OK
r-devel-windows-ix86+x86_64 1.0-0 16.00 63.00 79.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.0-0 22.00 67.00 89.00 OK
r-patched-linux-x86_64 1.0-0 9.77 58.78 68.55 OK
r-patched-solaris-x86 1.0-0 98.30 OK
r-release-linux-x86_64 1.0-0 10.14 60.54 70.68 OK
r-release-windows-ix86+x86_64 1.0-0 13.00 65.00 78.00 OK
r-release-osx-x86_64 1.0-0 OK
r-oldrel-windows-ix86+x86_64 1.0-0 12.00 63.00 75.00 OK
r-oldrel-osx-x86_64 1.0-0 OK

Check Details

Version: 1.0-0
Check: examples
Result: ERROR
    Running examples in 'segmented-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: aapc
    > ### Title: Average annual per cent change in segmented trend analysis
    > ### Aliases: aapc
    > ### Keywords: regression
    >
    > ### ** Examples
    >
    > set.seed(12)
    > x<-1:20
    > y<-2-.5*x+.7*pmax(x-9,0)-.8*pmax(x-15,0)+rnorm(20)*.3
    > o<-lm(y~x)
    > os<-segmented(o, psi=c(5,12))
    > aapc(os)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    segmented
     --- call from context ---
    slope(ogg, parm)
     --- call from argument ---
    if (class(covv) != "try-error") {
     cov.ok <- covv[ind, ind]
     cov.out <- M %*% cov.ok %*% t(M)
     se.out <- sqrt(diag(cov.out))
     k <- if ("lm" %in% class(ogg))
     abs(qt((1 - conf.level)/2, df = ogg$df.residual))
     else abs(qnorm((1 - conf.level)/2))
     k <- k * se.out
     ris <- cbind(cof.out, se.out, (cof.out/se.out), (cof.out -
     k), (cof.out + k))
    } else {
     ris <- cbind(cof.out, NA, NA, NA, NA)
    }
     --- R stacktrace ---
    where 1: slope(ogg, parm)
    where 2: aapc(os)
    
     --- value of length: 2 type: logical ---
    [1] TRUE TRUE
     --- function from context ---
    function (ogg, parm, conf.level = 0.95, rev.sgn = FALSE, APC = FALSE,
     .vcov = NULL, ..., digits = max(4, getOption("digits") -
     2))
    {
     f.U <- function(nomiU, term = NULL) {
     k <- length(nomiU)
     nomiUsenzaU <- strsplit(nomiU, "\\.")
     nomiU.ok <- vector(length = k)
     for (i in 1:k) {
     nomi.i <- nomiUsenzaU[[i]][-1]
     if (length(nomi.i) > 1)
     nomi.i <- paste(nomi.i, collapse = ".")
     nomiU.ok[i] <- nomi.i
     }
     if (!is.null(term))
     nomiU.ok <- (1:k)[nomiU.ok %in% term]
     return(nomiU.ok)
     }
     covv <- try(vcov(ogg, ...), silent = TRUE)
     covv <- if (is.null(.vcov))
     vcov(ogg, ...)
     else .vcov
     if (!all(dim(covv) == c(length(coef(ogg)), length(coef(ogg)))))
     stop("Incorrect dimension of cov matrix", call. = FALSE)
     nomepsi <- rownames(ogg$psi)
     nomeU <- ogg$nameUV$U
     nomeZ <- ogg$nameUV$Z
     if (missing(parm)) {
     nomeZ <- ogg$nameUV$Z
     if (length(rev.sgn) == 1)
     rev.sgn <- rep(rev.sgn, length(nomeZ))
     }
     else {
     if (!all(parm %in% ogg$nameUV$Z)) {
     stop("invalid parm")
     }
     else {
     nomeZ <- parm
     }
     }
     if (length(rev.sgn) != length(nomeZ))
     rev.sgn <- rep(rev.sgn, length.out = length(nomeZ))
     nomi <- names(coef(ogg))
     nomi <- nomi[-match(nomepsi, nomi)]
     index <- vector(mode = "list", length = length(nomeZ))
     for (i in 1:length(nomeZ)) {
     nomiPsi <- grep(paste(".", nomeZ[i], sep = ""), ogg$nameUV$V,
     value = TRUE)
     psii <- ogg$psi[nomiPsi, "Est."]
     nomiU <- grep(paste(".", nomeZ[i], sep = ""), ogg$nameUV$U,
     value = TRUE)
     id.cof.U <- match(nomiU, names(ogg$coef))
     index[[i]] <- c(match(nomeZ[i], nomi), id.cof.U)
     }
     Ris <- list()
     rev.sgn <- rep(rev.sgn, length.out = length(nomeZ))
     for (i in 1:length(index)) {
     ind <- as.numeric(na.omit(unlist(index[[i]])))
     M <- matrix(1, length(ind), length(ind))
     M[row(M) < col(M)] <- 0
     cof <- coef(ogg)[ind]
     cof.out <- M %*% cof
     if (class(covv) != "try-error") {
     cov.ok <- covv[ind, ind]
     cov.out <- M %*% cov.ok %*% t(M)
     se.out <- sqrt(diag(cov.out))
     k <- if ("lm" %in% class(ogg))
     abs(qt((1 - conf.level)/2, df = ogg$df.residual))
     else abs(qnorm((1 - conf.level)/2))
     k <- k * se.out
     ris <- cbind(cof.out, se.out, (cof.out/se.out), (cof.out -
     k), (cof.out + k))
     }
     else {
     ris <- cbind(cof.out, NA, NA, NA, NA)
     }
     cin <- paste("CI", "(", conf.level * 100, "%", ")", c(".l",
     ".u"), sep = "")
     if (!nomeZ[i] %in% nomi) {
     ris <- rbind(c(0, rep(NA, (ncol(ris) - 1))), ris)
     }
     if (rev.sgn[i]) {
     ris <- cbind(-ris[nrow(ris):1, 1], ris[nrow(ris):1,
     2], -ris[nrow(ris):1, 3], -ris[nrow(ris):1, 5],
     -ris[nrow(ris):1, 4])
     }
     nomeT <- if ("lm" %in% class(ogg))
     "t value"
     else "z value"
     dimnames(ris) <- list(paste("slope", 1:nrow(ris), sep = ""),
     c("Est.", "St.Err.", nomeT, cin[1], cin[2]))
     if (APC)
     ris <- 100 * (exp(ris[, c(1, 4, 5)]) - 1)
     Ris[[nomeZ[i]]] <- signif(ris, digits)
     }
     Ris
    }
    <bytecode: 0x26625b0>
    <environment: namespace:segmented>
     --- function search by body ---
    Function slope in namespace segmented has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.0-0
Check: examples
Result: ERROR
    Running examples in ‘segmented-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: aapc
    > ### Title: Average annual per cent change in segmented trend analysis
    > ### Aliases: aapc
    > ### Keywords: regression
    >
    > ### ** Examples
    >
    > set.seed(12)
    > x<-1:20
    > y<-2-.5*x+.7*pmax(x-9,0)-.8*pmax(x-15,0)+rnorm(20)*.3
    > o<-lm(y~x)
    > os<-segmented(o, psi=c(5,12))
    > aapc(os)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    segmented
     --- call from context ---
    slope(ogg, parm)
     --- call from argument ---
    if (class(covv) != "try-error") {
     cov.ok <- covv[ind, ind]
     cov.out <- M %*% cov.ok %*% t(M)
     se.out <- sqrt(diag(cov.out))
     k <- if ("lm" %in% class(ogg))
     abs(qt((1 - conf.level)/2, df = ogg$df.residual))
     else abs(qnorm((1 - conf.level)/2))
     k <- k * se.out
     ris <- cbind(cof.out, se.out, (cof.out/se.out), (cof.out -
     k), (cof.out + k))
    } else {
     ris <- cbind(cof.out, NA, NA, NA, NA)
    }
     --- R stacktrace ---
    where 1: slope(ogg, parm)
    where 2: aapc(os)
    
     --- value of length: 2 type: logical ---
    [1] TRUE TRUE
     --- function from context ---
    function (ogg, parm, conf.level = 0.95, rev.sgn = FALSE, APC = FALSE,
     .vcov = NULL, ..., digits = max(4, getOption("digits") -
     2))
    {
     f.U <- function(nomiU, term = NULL) {
     k <- length(nomiU)
     nomiUsenzaU <- strsplit(nomiU, "\\.")
     nomiU.ok <- vector(length = k)
     for (i in 1:k) {
     nomi.i <- nomiUsenzaU[[i]][-1]
     if (length(nomi.i) > 1)
     nomi.i <- paste(nomi.i, collapse = ".")
     nomiU.ok[i] <- nomi.i
     }
     if (!is.null(term))
     nomiU.ok <- (1:k)[nomiU.ok %in% term]
     return(nomiU.ok)
     }
     covv <- try(vcov(ogg, ...), silent = TRUE)
     covv <- if (is.null(.vcov))
     vcov(ogg, ...)
     else .vcov
     if (!all(dim(covv) == c(length(coef(ogg)), length(coef(ogg)))))
     stop("Incorrect dimension of cov matrix", call. = FALSE)
     nomepsi <- rownames(ogg$psi)
     nomeU <- ogg$nameUV$U
     nomeZ <- ogg$nameUV$Z
     if (missing(parm)) {
     nomeZ <- ogg$nameUV$Z
     if (length(rev.sgn) == 1)
     rev.sgn <- rep(rev.sgn, length(nomeZ))
     }
     else {
     if (!all(parm %in% ogg$nameUV$Z)) {
     stop("invalid parm")
     }
     else {
     nomeZ <- parm
     }
     }
     if (length(rev.sgn) != length(nomeZ))
     rev.sgn <- rep(rev.sgn, length.out = length(nomeZ))
     nomi <- names(coef(ogg))
     nomi <- nomi[-match(nomepsi, nomi)]
     index <- vector(mode = "list", length = length(nomeZ))
     for (i in 1:length(nomeZ)) {
     nomiPsi <- grep(paste(".", nomeZ[i], sep = ""), ogg$nameUV$V,
     value = TRUE)
     psii <- ogg$psi[nomiPsi, "Est."]
     nomiU <- grep(paste(".", nomeZ[i], sep = ""), ogg$nameUV$U,
     value = TRUE)
     id.cof.U <- match(nomiU, names(ogg$coef))
     index[[i]] <- c(match(nomeZ[i], nomi), id.cof.U)
     }
     Ris <- list()
     rev.sgn <- rep(rev.sgn, length.out = length(nomeZ))
     for (i in 1:length(index)) {
     ind <- as.numeric(na.omit(unlist(index[[i]])))
     M <- matrix(1, length(ind), length(ind))
     M[row(M) < col(M)] <- 0
     cof <- coef(ogg)[ind]
     cof.out <- M %*% cof
     if (class(covv) != "try-error") {
     cov.ok <- covv[ind, ind]
     cov.out <- M %*% cov.ok %*% t(M)
     se.out <- sqrt(diag(cov.out))
     k <- if ("lm" %in% class(ogg))
     abs(qt((1 - conf.level)/2, df = ogg$df.residual))
     else abs(qnorm((1 - conf.level)/2))
     k <- k * se.out
     ris <- cbind(cof.out, se.out, (cof.out/se.out), (cof.out -
     k), (cof.out + k))
     }
     else {
     ris <- cbind(cof.out, NA, NA, NA, NA)
     }
     cin <- paste("CI", "(", conf.level * 100, "%", ")", c(".l",
     ".u"), sep = "")
     if (!nomeZ[i] %in% nomi) {
     ris <- rbind(c(0, rep(NA, (ncol(ris) - 1))), ris)
     }
     if (rev.sgn[i]) {
     ris <- cbind(-ris[nrow(ris):1, 1], ris[nrow(ris):1,
     2], -ris[nrow(ris):1, 3], -ris[nrow(ris):1, 5],
     -ris[nrow(ris):1, 4])
     }
     nomeT <- if ("lm" %in% class(ogg))
     "t value"
     else "z value"
     dimnames(ris) <- list(paste("slope", 1:nrow(ris), sep = ""),
     c("Est.", "St.Err.", nomeT, cin[1], cin[2]))
     if (APC)
     ris <- 100 * (exp(ris[, c(1, 4, 5)]) - 1)
     Ris[[nomeZ[i]]] <- signif(ris, digits)
     }
     Ris
    }
    <bytecode: 0x5595af7c2970>
    <environment: namespace:segmented>
     --- function search by body ---
    Function slope in namespace segmented has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-gcc