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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: predict.merMod
> ### Title: Predictions from a model at new data values
> ### Aliases: predict.merMod
> 
> ### ** Examples
> 
> (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 |herd), cbpp, binomial))
Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: binomial  ( logit )
Formula: cbind(incidence, size - incidence) ~ period + (1 | herd)
   Data: cbpp
     AIC      BIC   logLik deviance df.resid 
194.0531 204.1799 -92.0266 184.0531       51 
Random effects:
 Groups Name        Std.Dev.
 herd   (Intercept) 0.6421  
Number of obs: 56, groups:  herd, 15
Fixed Effects:
(Intercept)      period2      period3      period4  
    -1.3983      -0.9919      -1.1282      -1.5797  
> str(p0 <- predict(gm1))            # fitted values
 Named num [1:56] -0.809 -1.801 -1.937 -2.388 -1.697 ...
 - attr(*, "names")= chr [1:56] "1" "2" "3" "4" ...
> str(p1 <- predict(gm1,re.form=NA))  # fitted values, unconditional (level-0)
 Named num [1:56] -1.4 -2.39 -2.53 -2.98 -1.4 ...
 - attr(*, "names")= chr [1:56] "1" "2" "3" "4" ...
> newdata <- with(cbpp, expand.grid(period=unique(period), herd=unique(herd)))
> str(p2 <- predict(gm1,newdata))    # new data, all RE
 Named num [1:60] -0.809 -1.801 -1.937 -2.388 -1.697 ...
 - attr(*, "names")= chr [1:60] "1" "2" "3" "4" ...
> str(p3 <- predict(gm1,newdata,re.form=NA)) # new data, level-0
 Named num [1:60] -1.4 -2.39 -2.53 -2.98 -1.4 ...
 - attr(*, "names")= chr [1:60] "1" "2" "3" "4" ...
> str(p4 <- predict(gm1,newdata,re.form= ~(1|herd))) # explicitly specify RE
 Named num [1:60] -0.809 -1.801 -1.937 -2.388 -1.697 ...
 - attr(*, "names")= chr [1:60] "1" "2" "3" "4" ...
> stopifnot(identical(p2, p4))
> ## Don't show: 
> suppressWarnings(stopifnot(identical(p1, predict(gm1,ReForm=NA))))
> suppressWarnings(stopifnot(identical(p3, predict(gm1,newdata,REForm=NA))))
> suppressWarnings(stopifnot(identical(p4, predict(gm1,newdata,REform=~(1|herd)))))
> 
> ## predict() should work with variable names with spaces [as lm() does]:
> dd <- expand.grid(y=1:3, "Animal ID" = 1:9)
> fm <- lmer(y ~ 1 + (1 | `Animal ID`),  dd)
Error: couldn't evaluate grouping factor `Animal ID` within model frame: try adding grouping factor to data frame explicitly if possible
Execution halted