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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: GenDavidson
> ### Title: Specify a Generalised Davidson Term in a gnm Model Formula
> ### Aliases: GenDavidson
> ### Keywords: models nonlinear
> 
> ### ** Examples
> 
> 
> ### example requires gnm
> if (require(gnm)) {
+     ### convert to trinomial counts
+     football.tri <- expandCategorical(football, "result", idvar = "match")
+     head(football.tri)
+ 
+     ### add variable to indicate whether team playing at home
+     football.tri$at.home <- !logical(nrow(football.tri))
+ 
+     ### fit shifted & scaled Davidson model
+     ###  - subset to first and last season for illustration
+     shifScalDav <- gnm(count ~
+         GenDavidson(result == 1, result == 0, result == -1,
+                     home:season, away:season, home.adv = ~1,
+                     tie.max = ~1, tie.scale = ~1, tie.mode = ~1,
+                     at.home1 = at.home,
+                     at.home2 = !at.home) - 1,
+         eliminate = match, family = poisson, data = football.tri,
+         subset = season %in% c("2008-9", "2012-13"))
+ 
+     ### look at coefs
+     coef <- coef(shifScalDav)
+     ## home advantage
+     exp(coef["home.adv"])
+     ## max p(tie)
+     plogis(coef["tie.max"])
+     ## mode p(tie)
+     plogis(coef["tie.mode"])
+     ## scale relative to Davidson of dependence of p(tie) on p(win|not a draw)
+     exp(coef["tie.scale"])
+ 
+     ### check model fit
+     alpha <- names(coef[-(1:4)])
+     plotProportions(result == 1, result == 0, result == -1,
+                     home:season, away:season,
+                     abilities = coef[alpha], home.adv = coef["home.adv"],
+                     tie.max = coef["tie.max"], tie.scale = coef["tie.scale"],
+                     tie.mode = coef["tie.mode"],
+                     at.home1 = at.home, at.home2 = !at.home,
+                     data = football.tri, subset = count == 1)
+ }
Loading required package: gnm
Initialising
Error in bquote(`result == -1` * ((`101`) * `!at.home` + `15away:season`) +  : 
  'where' must be an environment
Calls: gnm ... gnmFit -> <Anonymous> -> lapply -> FUN -> do.call -> bquote
Execution halted