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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ci.cum
> ### Title: Compute cumulative sum of estimates.
> ### Aliases: ci.cum
> ### Keywords: models regression
> 
> ### ** Examples
> 
> # Packages required for this example
> library( splines )
> library( survival )
> data( lung )
> par( mfrow=c(1,2) )
> 
> # Plot the Kaplan-meier-estimator
> plot( survfit( Surv( time, status==2 ) ~ 1, data=lung ) )
> 
> # Declare data as Lexis
> lungL <- Lexis( exit=list("tfd"=time),
+                 exit.status=(status==2)*1, data=lung )
NOTE: entry.status has been set to 0 for all.
NOTE: entry is assumed to be 0 on the tfd timescale.
> summary( lungL )
    
Transitions:
     To
From  0   1  Records:  Events: Risk time:  Persons:
   0 63 165       228      165      69593       228
> 
> # Cut the follow-up every 10 days
> sL <- splitLexis( lungL, "tfd", breaks=seq(0,1100,10) )
> str( sL )
Classes ‘Lexis’ and 'data.frame':	7071 obs. of  15 variables:
 $ lex.id   : int  1 1 1 1 1 1 1 1 1 1 ...
 $ tfd      : num  0 10 20 30 40 50 60 70 80 90 ...
 $ lex.dur  : num  10 10 10 10 10 10 10 10 10 10 ...
 $ lex.Cst  : num  0 0 0 0 0 0 0 0 0 0 ...
 $ lex.Xst  : num  0 0 0 0 0 0 0 0 0 0 ...
 $ inst     : num  3 3 3 3 3 3 3 3 3 3 ...
 $ time     : num  306 306 306 306 306 306 306 306 306 306 ...
 $ status   : num  2 2 2 2 2 2 2 2 2 2 ...
 $ age      : num  74 74 74 74 74 74 74 74 74 74 ...
 $ sex      : num  1 1 1 1 1 1 1 1 1 1 ...
 $ ph.ecog  : num  1 1 1 1 1 1 1 1 1 1 ...
 $ ph.karno : num  90 90 90 90 90 90 90 90 90 90 ...
 $ pat.karno: num  100 100 100 100 100 100 100 100 100 100 ...
 $ meal.cal : num  1175 1175 1175 1175 1175 ...
 $ wt.loss  : num  NA NA NA NA NA NA NA NA NA NA ...
 - attr(*, "breaks")=List of 1
  ..$ tfd: num  0 10 20 30 40 50 60 70 80 90 ...
 - attr(*, "time.scales")= chr "tfd"
 - attr(*, "time.since")= chr ""
> summary( sL )
    
Transitions:
     To
From    0   1  Records:  Events: Risk time:  Persons:
   0 6906 165      7071      165      69593       228
> 
> # Fit a Poisson model with a natural spline for the effect of time.
> # Extract the variables needed
> D <- status(sL, "exit")
> Y <- dur(sL)
> tB <- timeBand( sL, "tfd", "left" )
> MM <- ns( tB, knots=c(50,100,200,400,700), intercept=TRUE )
> mp <- glm( D ~ MM - 1 + offset(log(Y)),
+            family=poisson, eps=10^-8, maxit=25 )
Error in call[[1L]] : object of type 'symbol' is not subsettable
Calls: glm ... model.frame.default -> makepredictcall -> makepredictcall.ns -> eval
Execution halted