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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: groupedSurv
> ### Title: Compute the Efficient Score Statistic for the Grouped Survival
> ###   Model
> ### Aliases: groupedSurv
> 
> ### ** Examples
> 
> # Generate dummy data
> set.seed(111)
> n <- 1000
> 
> # effect size
> beta <- 0.4
> 
> # covariate parameters
> theta <- c(0.2, 0.2)
> 
> # variable of interest associated with outcome
> MAF <- 0.05
> x <- matrix(rbinom(n, 2, MAF), ncol = 1)
> 
> # covariate data (centered at 0)
> z1 <- rnorm(n)
> z2 <- rbinom(n, 1, 0.5) - 0.5
> Z  <- matrix(cbind(z1, z2), ncol = 2)
> 
> # continuous survival time
> lam0 <- 1
> cmax <- 3
> lami <- lam0 * exp(x*beta + Z[,1]*theta[1]+Z[,2]*theta[2])
> stime <- rexp(n, lami)
> ctime <- runif(n, 0, cmax)
> delta <- stime < ctime
> otime <- pmin(stime, ctime)
> 
> # additional variables of interest
> xMore <- matrix(rbinom(n*100, 2, MAF), ncol = 100)
> xMore <- cbind(x, xMore)
> 
> # number of observation times
> ntps <- 5
> 
> # number of intervals
> r <- ntps + 1
> 
> # last observation time
> maxbreakq <- 0.85
> maxbreak <- qexp(maxbreakq, lam0)
> 
> # grouped failure times
> breaks <- (1:ntps) * (maxbreak/ntps)
> gtime <- findInterval(otime, breaks) + 1
> delta[gtime == r] <- FALSE
> dctime <- findInterval(ctime, breaks) + 1
> delta[gtime == dctime] <- FALSE
> delta <- as.numeric(delta)
> gtime[which(gtime == r)] <- Inf
> 
> # estimate nuisance parameters
> thetaest <- thetaEst(Z, gtime, delta)
> 
> # compute efficient score statistics
> eff <- groupedSurv(x=xMore, Z=Z, alpha=thetaest$alpha, theta=thetaest$theta,
+ 		gtime=gtime, delta=delta, beta=0, nCores=1)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
groupedSurv
 --- call from context --- 
groupedSurv(x = xMore, Z = Z, alpha = thetaest$alpha, theta = thetaest$theta, 
    gtime = gtime, delta = delta, beta = 0, nCores = 1)
 --- call from argument --- 
if (class(Z) == "character") Z <- GenABEL.data@phdata[, Z]
 --- R stacktrace ---
where 1: groupedSurv(x = xMore, Z = Z, alpha = thetaest$alpha, theta = thetaest$theta, 
    gtime = gtime, delta = delta, beta = 0, nCores = 1)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, Z = NULL, GenABEL.data = NULL, alpha, theta = NULL, 
    gtime, delta, beta = 0, nCores = 1, reScore = FALSE) 
{
    if (sum(is.infinite(gtime)) >= 1) 
        ntps <- nlevels(as.factor(gtime)) - 1
    else ntps <- nlevels(as.factor(gtime))
    if (class(Z) == "character") 
        Z <- GenABEL.data@phdata[, Z]
    .effScore(x, Z, GenABEL.data, alpha, theta, gtime, delta, 
        beta, ntps, nCores, reScore)
}
<bytecode: 0x1153fae8>
<environment: namespace:groupedSurv>
 --- function search by body ---
Function groupedSurv in namespace groupedSurv has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1