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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plot.summary.sievePH
> ### Title: Plotting Mark-Specific Proportional Hazards Model Fits
> ### Aliases: plot.summary.sievePH
> 
> ### ** Examples
> 
> n <- 500
> tx <- rep(0:1, each=n/2)
> tm <- c(rexp(n/2, 0.2), rexp(n/2, 0.2 * exp(-0.4)))
> cens <- runif(n, 0, 15)
> eventTime <- pmin(tm, cens, 3)
> eventInd <- as.numeric(tm <= pmin(cens, 3))
> mark <- ifelse(eventInd==1, c(rbeta(n/2, 2, 5), rbeta(n/2, 2, 2)), NA)
> markRng <- range(mark, na.rm=TRUE)
> 
> # fit a model with a univariate mark
> fit <- sievePH(eventTime, eventInd, mark, tx)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
sievePH
 --- call from context --- 
densRatio(mark[eventInd == 1, ], tx[eventInd == 1])
 --- call from argument --- 
if (class(jackInv) != "try-error") {
    param.new <- param.old - drop(jackInv %*% score(param.old[-(nmark + 
        1)], param.old[nmark + 1]))
}
 --- R stacktrace ---
where 1: densRatio(mark[eventInd == 1, ], tx[eventInd == 1])
where 2: sievePH(eventTime, eventInd, mark, tx)

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (mark, tx) 
{
    mark <- as.matrix(mark)
    V <- cbind(1, mark)
    z <- tx
    nmark <- NCOL(V)
    ninf <- NROW(V)
    VV <- apply(V, 1, tcrossprod)
    g <- function(theta) {
        exp(drop(V %*% theta))
    }
    dG <- function(theta) {
        t(g(theta) * V)
    }
    d2G <- function(theta) {
        array(t(t(VV) * g(theta)), dim = c(nmark, nmark, ninf))
    }
    dGdG <- function(theta) {
        array(apply(dG(theta), 2, tcrossprod), dim = c(nmark, 
            nmark, ninf))
    }
    score1 <- function(theta, lambda) {
        drop(-lambda * dG(theta) %*% (1/(1 + lambda * (g(theta) - 
            1))) + dG(theta) %*% (z/g(theta)))
    }
    score2 <- function(theta, lambda) {
        -sum((g(theta) - 1)/(1 + lambda * (g(theta) - 1)))
    }
    score <- function(theta, lambda) {
        c(score1(theta, lambda), score2(theta, lambda))
    }
    jack11 <- function(theta, lambda) {
        d2Gperm <- aperm(d2G(theta), c(3, 1, 2))
        dGdGperm <- aperm(dGdG(theta), c(3, 1, 2))
        term1 <- apply(aperm(d2Gperm * (1/(1 + lambda * (g(theta) - 
            1))), c(2, 3, 1)), c(1, 2), sum)
        term2 <- apply(aperm(dGdGperm * (1/(1 + lambda * (g(theta) - 
            1))^2), c(2, 3, 1)), c(1, 2), sum)
        term3 <- apply(aperm(d2Gperm * (z/g(theta)), c(2, 3, 
            1)), c(1, 2), sum)
        term4 <- apply(aperm(dGdGperm * (z/g(theta)^2), c(2, 
            3, 1)), c(1, 2), sum)
        -lambda * (term1 - lambda * term2) + term3 - term4
    }
    jack21 <- function(theta, lambda) {
        drop(-dG(theta) %*% (1/(1 + lambda * (g(theta) - 1))^2))
    }
    jack22 <- function(theta, lambda) {
        sum(((g(theta) - 1)/(1 + lambda * (g(theta) - 1)))^2)
    }
    jack <- function(theta, lambda) {
        j21 <- jack21(theta, lambda)
        cbind(rbind(jack11(theta, lambda), j21), c(j21, jack22(theta, 
            lambda)))
    }
    param.old <- numeric(nmark + 1)
    param.new <- c(numeric(nmark), 0.5)
    while (sum((param.new - param.old)^2) > 1e-08) {
        param.old <- param.new
        jackInv <- try(solve(jack(param.old[-(nmark + 1)], param.old[nmark + 
            1])), silent = TRUE)
        if (class(jackInv) != "try-error") {
            param.new <- param.old - drop(jackInv %*% score(param.old[-(nmark + 
                1)], param.old[nmark + 1]))
        }
        if (sum(is.nan(param.new)) > 0) 
            break
    }
    theta.new <- param.new[-(nmark + 1)]
    lambda.new <- param.new[nmark + 1]
    SigmaHat <- function(theta, lambda) {
        L <- -lambda * t(dG(theta)) * (1/(1 + lambda * (g(theta) - 
            1))) + t(dG(theta)) * (z/g(theta))
        L <- cbind(L, (g(theta) - 1)/(1 + lambda * (g(theta) - 
            1)))
        crossprod(L)/ninf
    }
    JackInv <- try(solve(jack(theta.new, lambda.new)), silent = TRUE)
    if (class(JackInv) != "try-error") {
        Var <- ninf * JackInv %*% SigmaHat(theta.new, lambda.new) %*% 
            JackInv
        names(param.new) <- rownames(Var) <- colnames(Var) <- c("alpha", 
            paste("beta", 1:(nmark - 1), sep = ""), "lambda")
    }
    else {
        Var <- NULL
    }
    return(list(coef = param.new, var = Var, jack = jack11(theta.new, 
        lambda.new), conv = !(class(jackInv) == "try-error" | 
        class(JackInv) == "try-error")))
}
<bytecode: 0xa1dc2b8>
<environment: namespace:sievePH>
 --- function search by body ---
Function densRatio in namespace sievePH has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1