Binary files 7.3-57-1/build/partial.rdb and 7.3-58.1-1/build/partial.rdb differ
diff -pruN 7.3-57-1/ChangeLog 7.3-58.1-1/ChangeLog
--- 7.3-57-1/ChangeLog	1970-01-01 00:00:00.000000000 +0000
+++ 7.3-58.1-1/ChangeLog	2022-07-27 05:25:16.000000000 +0000
@@ -0,0 +1,90 @@
+7.3-58.1 (released 2022-07-27)
+	DESCRIPTION: No longer suggest gamaair.
+	tests/polr.R: use named .pdf file.
+	tests/glmmPQL.R, solr.rda: ship data file, skip if no nlme.
+
+7.3-58  (released 2022-07-14)
+	glmmPQL: work around disabling of offsets in nlme::lme,
+	  following a request from Simon Wood.
+	glmmPQL: Add any offset to fitted values.
+	tests/glmmPQL.R: add (modified) example from Simon Wood.
+	DESCRIPTION: add Suggests: gamair for that example.
+	tests/confit.R: name PDF file
+	tests/scripts.R: mention packages needed not in Suggests.
+	inst/scripts/ch{11,13}.R tweaks.
+	inst/scripts/ch15.R: switch from akima to interp.
+	man/*.Rd: change references to third edition to fourth.
+
+7.3-57.2 (released 2022-07-10, R-devel only)
+	src/MASS.c: #include <limits.h> rather than rely on R.h.
+	man/glmmPQL.Rd: example no longer attaches nlme.
+
+7.3-57.1 (released 2022-05-30, R-devel only)
+	Start ChangeLog.
+	src/lqs.c: clang defines __GNUC__, so rule out.
+	src/MASS.c: replace Sfloat/Sint.
+
+7.3-57 (released 2022-04-23, after R 4.2.0)
+	add formula method for glmmPQL (suggested by Sebastian Meyer)
+	update reference output for LAPACK 3.10.x, more use of IGNORE_RDIFF.
+	add pragmas to src/lqs.c to avoid mis-optimization in pre-gcc12
+	  (and before at high optimization levels).
+	add check for gcc12 woes to tests/cov.mcd.R
+	remove basckslash from \$ in Boston.Rd and Cars93.Rd
+
+7.3-56 (released 2022-03-23)
+	offsets on lme have been disabled
+
+7.3-55 (released 2022-01-13)
+	src/lqs.c include float.h explicitly (for STRICT_R_HEADERS)
+	src/MASS.c: prefer R_Calloc etc.
+	Update de, fr translations.
+
+7.3-54 (released 2021-05-03)
+	Update .pot files, fr translations.
+
+7.3-53.1 (released 2021-02-12)
+	Use \doi rather than \url, so bump minimum R requirement.
+	Update .pot files.
+
+7.3-53 (released 2020-09-09)
+	allaw for possible integer overflow
+	mention hard limit in cov.rob.Rd
+	expaand description of 'data' args.
+
+7.3-52 (released 2020-08-18)
+	rlm with offset term
+	correct description in newcomb.Rd
+	typo in cats.Rd
+
+7.3-51.[1-6] (released 2018-11-01 to 2020-04-26)
+	typo in man/cats.Rd
+	Use RDIFF markup
+	add it translations
+	change .Rout.save for change in RNG in R 3.6.0
+	change .Rout.save for survival changes
+
+7.3-51 (released 2018-10-16)
+	replace broken URL
+	remove S-style example
+
+7.3-50 (released 2018-04-30)
+	survival changed output
+	update .pot files
+
+7.3-49 (released 2018-02-23)
+	remove 'f' from fitdistr
+	make tests/lme4.R conditional on nlme
+
+7.3-48 (released 2017-12-25)
+	\testonly -> \dontshow
+	move extractAIC methods to nlme.
+
+7.3-47 (released 2017-04-21)
+	Cosmetics
+	Check for integer overflow in density binning.
+
+7.3-46 (released 2017-02-14)
+	Avoid partial match in rlm.default.
+	Include headers explicitly in MASS.c and lqs.c
+	Use R_forceSymbols(dll, TRUE) uncondiitonally.
diff -pruN 7.3-57-1/debian/changelog 7.3-58.1-1/debian/changelog
--- 7.3-57-1/debian/changelog	2022-04-22 18:37:54.000000000 +0000
+++ 7.3-58.1-1/debian/changelog	2022-08-04 17:51:04.000000000 +0000
@@ -1,3 +1,18 @@
+r-cran-mass (7.3-58.1-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Thu, 04 Aug 2022 12:51:04 -0500
+
+r-cran-mass (7.3-58-1) unstable; urgency=medium
+
+  * New upstream release
+  
+  * debian/control: Set Build-Depends: to current R version
+  * debian/control: Set Standards-Version: to current version
+
+ -- Dirk Eddelbuettel <edd@debian.org>  Thu, 14 Jul 2022 06:43:39 -0500
+
 r-cran-mass (7.3-57-1) unstable; urgency=medium
 
   * New upstream release
diff -pruN 7.3-57-1/debian/control 7.3-58.1-1/debian/control
--- 7.3-57-1/debian/control	2022-04-22 18:37:37.000000000 +0000
+++ 7.3-58.1-1/debian/control	2022-07-14 11:43:54.000000000 +0000
@@ -2,8 +2,8 @@ Source: r-cran-mass
 Section: gnu-r
 Priority: optional
 Maintainer: Dirk Eddelbuettel <edd@debian.org>
-Build-Depends: debhelper-compat (= 11), r-base-dev (>= 4.2.0), dh-r
-Standards-Version: 4.6.0
+Build-Depends: debhelper-compat (= 11), r-base-dev (>= 4.2.1), dh-r
+Standards-Version: 4.6.1
 Vcs-Browser: https://salsa.debian.org/edd/r-cran-mass
 Vcs-Git: https://salsa.debian.org/edd/r-cran-mass.git
 Homepage: https://cran.r-project.org/package=MASS
diff -pruN 7.3-57-1/DESCRIPTION 7.3-58.1-1/DESCRIPTION
--- 7.3-57-1/DESCRIPTION	2022-04-22 11:45:27.000000000 +0000
+++ 7.3-58.1-1/DESCRIPTION	2022-08-03 15:06:59.000000000 +0000
@@ -1,8 +1,8 @@
 Package: MASS
 Priority: recommended
-Version: 7.3-57
-Date: 2022-04-05
-Revision: $Rev: 3564 $
+Version: 7.3-58.1
+Date: 2022-07-27
+Revision: $Rev: 3606 $
 Depends: R (>= 3.3.0), grDevices, graphics, stats, utils
 Imports: methods
 Suggests: lattice, nlme, nnet, survival
@@ -24,7 +24,7 @@ License: GPL-2 | GPL-3
 URL: http://www.stats.ox.ac.uk/pub/MASS4/
 Contact: <MASS@stats.ox.ac.uk>
 NeedsCompilation: yes
-Packaged: 2022-04-19 04:13:16 UTC; ripley
+Packaged: 2022-07-27 05:37:13 UTC; ripley
 Author: Brian Ripley [aut, cre, cph],
   Bill Venables [ctb],
   Douglas M. Bates [ctb],
@@ -33,4 +33,4 @@ Author: Brian Ripley [aut, cre, cph],
   David Firth [ctb]
 Maintainer: Brian Ripley <ripley@stats.ox.ac.uk>
 Repository: CRAN
-Date/Publication: 2022-04-22 11:45:27 UTC
+Date/Publication: 2022-08-03 15:06:59 UTC
diff -pruN 7.3-57-1/inst/scripts/ch11.R 7.3-58.1-1/inst/scripts/ch11.R
--- 7.3-57-1/inst/scripts/ch11.R	2013-07-18 09:32:11.000000000 +0000
+++ 7.3-58.1-1/inst/scripts/ch11.R	2022-07-09 16:41:15.000000000 +0000
@@ -31,7 +31,8 @@ loadings(lcrabs.pca)
 lcrabs.pc <- predict(lcrabs.pca)
 dimnames(lcrabs.pc) <- list(NULL, paste("PC", 1:5, sep = ""))
 
-if(FALSE) { # needs interaction with XGobi, or, better, rggobi
+if(FALSE) { ## needs interaction with XGobi, or, better, rggobi
+    ## Both have been withdrawn for R.
 library(xgobi)
 xgobi(lcrabs, colors = c("SkyBlue", "SlateBlue", "Orange",
      "Red")[rep(1:4, each = 50)])
diff -pruN 7.3-57-1/inst/scripts/ch13.R 7.3-58.1-1/inst/scripts/ch13.R
--- 7.3-57-1/inst/scripts/ch13.R	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/inst/scripts/ch13.R	2022-07-09 16:35:33.000000000 +0000
@@ -164,8 +164,9 @@ coxph(Surv(start, stop, event) ~ transpl
 
 stan1 <- coxph(Surv(start, stop, event) ~ strata(transplant) +
     year + year:transplant + age + surgery, heart)
-par(mfrow=c(1,2), pty="s")
-plot(survfit(stan1), conf.int = TRUE, log = TRUE, lty = c(1, 3), col = 2:3)
+par(mfrow = c(1,2), pty = "s")
+## failed 2022-07
+## plot(survfit(stan1), conf.int = TRUE, log = TRUE, lty = c(1, 3), col = 2:3)
 #legend(locator(1), c("before", "after"), lty = c(1, 3), col= 2:3)
 
 attach(heart)
@@ -238,10 +239,11 @@ plot(aids2.surv[c(1, 5, 6, 8)], mark.tim
 #legend(locator(1), levels(T.categ)[c(1, 5, 6, 8)], lty = 1:4, col = 2:5)
 par(mfrow=c(1,1), pty="m")
 
-cases <- diff(c(0,idno)) != 0
-aids.res <- residuals(aids.cox, collapse = idno)
-scatter.smooth(age[cases], aids.res, xlab = "age",
-  ylab="martingale residual")
+## fails 2022-07
+#cases <- diff(c(0,idno)) != 0
+#aids.res <- residuals(aids.cox, collapse = idno)
+#scatter.smooth(age[cases], aids.res, xlab = "age",
+#  ylab = "martingale residual")
 
 age2 <- cut(age, c(-1, 15, 30, 40, 50, 60, 100))
 c.age <- factor(as.numeric(age2), labels = c("0-15", "16-30",
diff -pruN 7.3-57-1/inst/scripts/ch15.R 7.3-58.1-1/inst/scripts/ch15.R
--- 7.3-57-1/inst/scripts/ch15.R	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/inst/scripts/ch15.R	2022-06-04 10:33:50.000000000 +0000
@@ -76,15 +76,15 @@ contour(topo.mar$x,topo.mar$y,topo.lo$se
 title("Loess degree = 1")
 points(topo)
 
-library(akima)
+library(interp) # was akima, interp.old()
 par(mfrow = c(1, 2), pty=  "s")
-topo.int <- interp.old(topo$x, topo$y, topo$z)
+topo.int <- interp(topo$x, topo$y, topo$z)
 eqscplot(topo.int, xlab = "interp default", ylab = "", type = "n")
 contour(topo.int, levels = seq(600, 1000, 25), add = TRUE)
 points(topo)
 topo.mar <- list(x = seq(0, 6.5, 0.1), y = seq(0, 6.5, 0.1))
-topo.int2 <- interp.old(topo$x, topo$y, topo$z, topo.mar$x, topo.mar$y,
-                        ncp = 4, extrap = TRUE)
+topo.int2 <- interp(topo$x, topo$y, topo$z, topo.mar$x, topo.mar$y,
+                    extrap = TRUE) # was ncp = 4.
 eqscplot(topo.int2, xlab = "interp", ylab = "", type = "n")
 contour(topo.int2, levels = seq(600, 1000, 25), add = TRUE)
 points(topo)
diff -pruN 7.3-57-1/man/accdeaths.Rd 7.3-58.1-1/man/accdeaths.Rd
--- 7.3-57-1/man/accdeaths.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/accdeaths.Rd	2022-07-11 11:13:51.000000000 +0000
@@ -23,8 +23,7 @@ accdeaths
   Springer, New York.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/Animals.Rd 7.3-58.1-1/man/Animals.Rd
--- 7.3-57-1/man/Animals.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/Animals.Rd	2022-07-11 11:11:44.000000000 +0000
@@ -1,5 +1,5 @@
 % file MASS/man/animals.Rd
-% copyright (C) 1994-9 W. N. Venables and B. D. Ripley
+% copyright (C) 1994-2022 W. N. Venables and B. D. Ripley
 %
 \name{Animals}
 \alias{Animals}
@@ -23,7 +23,7 @@ Animals
   }
 }
 \note{
-  The name \code{Animals} avoids conflicts with a system dataset
+  The name \code{Animals} avoided conflicts with a system dataset
   \code{animals} in S-PLUS 4.5 and later.
 }
 \source{
@@ -32,8 +32,7 @@ Animals
   Wiley, p. 57.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/biopsy.Rd 7.3-58.1-1/man/biopsy.Rd
--- 7.3-57-1/man/biopsy.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/biopsy.Rd	2022-07-11 11:14:09.000000000 +0000
@@ -60,8 +60,7 @@ biopsy
   \bold{1}, pp. 23--34 (Gordon & Breach Science Publishers).
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/cabbages.Rd 7.3-58.1-1/man/cabbages.Rd
--- 7.3-57-1/man/cabbages.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/cabbages.Rd	2022-07-11 11:14:32.000000000 +0000
@@ -39,8 +39,7 @@ cabbages
   Dr Gertrude M Cox.)
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/Cars93.Rd 7.3-58.1-1/man/Cars93.Rd
--- 7.3-57-1/man/Cars93.Rd	2022-04-19 04:12:29.000000000 +0000
+++ 7.3-58.1-1/man/Cars93.Rd	2022-07-11 11:12:09.000000000 +0000
@@ -119,8 +119,7 @@ Cars93
 %  \url{http://www.amstat.org/publications/jse/v1n1/datasets.lock.html}.  
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/cov.trob.Rd 7.3-58.1-1/man/cov.trob.Rd
--- 7.3-57-1/man/cov.trob.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/cov.trob.Rd	2022-07-11 11:14:58.000000000 +0000
@@ -72,9 +72,8 @@ The number of iterations used.
   \emph{Communications in Statistics---Simulation and Computation}
   \bold{23}, 441--453.
 
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \seealso{
 \code{\link{cov}}, \code{\link{cov.wt}}, \code{\link{cov.mve}}
diff -pruN 7.3-57-1/man/drivers.Rd 7.3-58.1-1/man/drivers.Rd
--- 7.3-57-1/man/drivers.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/drivers.Rd	2022-07-11 11:15:20.000000000 +0000
@@ -20,8 +20,7 @@ drivers
   Cambridge University Press, pp. 519--523.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/eagles.Rd 7.3-58.1-1/man/eagles.Rd
--- 7.3-57-1/man/eagles.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/eagles.Rd	2022-07-11 11:15:41.000000000 +0000
@@ -41,9 +41,8 @@ eagles
   \emph{Ecology} \bold{69}, 1188--1194.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \examples{
 eagles.glm <- glm(cbind(y, n - y) ~ P*A + V, data = eagles,
diff -pruN 7.3-57-1/man/genotype.Rd 7.3-58.1-1/man/genotype.Rd
--- 7.3-57-1/man/genotype.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/genotype.Rd	2022-07-11 11:15:58.000000000 +0000
@@ -38,8 +38,7 @@ genotype
   Unpublished Ph.D. thesis, University of California. Table B of the Appendix.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/ginv.Rd 7.3-58.1-1/man/ginv.Rd
--- 7.3-57-1/man/ginv.Rd	2018-10-16 10:08:32.000000000 +0000
+++ 7.3-58.1-1/man/ginv.Rd	2022-07-11 11:16:29.000000000 +0000
@@ -1,5 +1,5 @@
 % file MASS/man/ginv.Rd
-% copyright (C) 1994-2018 W. N. Venables and B. D. Ripley
+% copyright (C) 1994-2022 W. N. Venables and B. D. Ripley
 %
 \name{ginv}
 \alias{ginv}
@@ -24,9 +24,8 @@ A relative tolerance to detect zero sing
 A MP generalized inverse matrix for \code{X}.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer. p.100.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \seealso{
 \code{\link{solve}}, \code{\link{svd}}, \code{\link{eigen}}
diff -pruN 7.3-57-1/man/glmmPQL.Rd 7.3-58.1-1/man/glmmPQL.Rd
--- 7.3-57-1/man/glmmPQL.Rd	2022-03-22 19:49:12.000000000 +0000
+++ 7.3-58.1-1/man/glmmPQL.Rd	2022-07-27 05:24:19.000000000 +0000
@@ -1,11 +1,11 @@
 \name{glmmPQL}
 \alias{glmmPQL}
 \title{
-Fit Generalized Linear Mixed Models via PQL
+  Fit Generalized Linear Mixed Models via PQL
 }
 \description{
-Fit a GLMM model with multivariate normal random effects, using
-Penalized Quasi-Likelihood.
+  Fit a GLMM model with multivariate normal random effects, using
+  Penalized Quasi-Likelihood.
 }
 \usage{
 glmmPQL(fixed, random, family, data, correlation, weights,
@@ -45,38 +45,52 @@ logical: print out record of iterations?
 Further arguments for \code{lme}.
 }}
 \value{
-A object of class \code{"lme"}: see \code{\link[nlme]{lmeObject}}.
+  A object of class \code{c("glmmPQL", "lme")}: see \code{\link[nlme]{lmeObject}}.
 }
 \details{
   \code{glmmPQL} works by repeated calls to \code{\link[nlme]{lme}}, so
-  package \code{nlme} will be loaded at first use if necessary.
+  namespace \CRANpkg{nlme} will be loaded at first use.  (Before 2015 it
+  used to attach \code{nlme} but nowadays only loads the namespace.)
+
+  Unlike \code{lme}, \code{\link{offset}} terms are allowed in
+  \code{fixed} -- this is done by pre- and post-processing the calls to
+  \code{lme}.
+
+  Note that the returned object inherits from class \code{"lme"} and
+  that most generics will use the method for that class.  As from
+  version 3.1-158, the fitted values have any offset included, as do
+  the results of calling \code{\link{predict}}.
 }
 \references{
-Schall, R. (1991) Estimation in generalized linear models with
-random effects.
-\emph{Biometrika}
-\bold{78}, 719--727.
-
-Breslow, N. E. and Clayton, D. G. (1993) Approximate inference in
-generalized linear mixed models.
-\emph{Journal of the American Statistical Association}
-\bold{88}, 9--25.
-
-Wolfinger, R. and O'Connell, M. (1993) Generalized linear mixed models: a
-pseudo-likelihood approach.
-\emph{Journal of Statistical Computation and Simulation}
-\bold{48}, 233--243.
+  Schall, R. (1991) Estimation in generalized linear models with
+  random effects.
+  \emph{Biometrika}
+  \bold{78}, 719--727.
+
+  Breslow, N. E. and Clayton, D. G. (1993) Approximate inference in
+  generalized linear mixed models.
+  \emph{Journal of the American Statistical Association}
+  \bold{88}, 9--25.
+
+  Wolfinger, R. and O'Connell, M. (1993) Generalized linear mixed models: a
+  pseudo-likelihood approach.
+  \emph{Journal of Statistical Computation and Simulation}
+  \bold{48}, 233--243.
 
   Venables, W. N. and Ripley, B. D. (2002)
   \emph{Modern Applied Statistics with S.} Fourth edition.  Springer.
-
 }
 \seealso{
   \code{\link[nlme]{lme}}
 }
 \examples{
-library(nlme) # will be loaded automatically if omitted
 summary(glmmPQL(y ~ trt + I(week > 2), random = ~ 1 | ID,
                 family = binomial, data = bacteria))
+
+## an example of an offset: the coefficient of 'week' changes by one.
+summary(glmmPQL(y ~ trt + week, random = ~ 1 | ID,
+               family = binomial, data = bacteria))
+summary(glmmPQL(y ~ trt + week + offset(week), random = ~ 1 | ID,
+                family = binomial, data = bacteria))
 }
 \keyword{models}
diff -pruN 7.3-57-1/man/immer.Rd 7.3-58.1-1/man/immer.Rd
--- 7.3-57-1/man/immer.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/immer.Rd	2022-07-11 11:10:42.000000000 +0000
@@ -1,5 +1,5 @@
 % file MASS/man/immer.Rd
-% copyright (C) 1994-9 W. N. Venables and B. D. Ripley
+% copyright (C) 1994-2022 W. N. Venables and B. D. Ripley
 %
 \name{immer}
 \alias{immer}
@@ -41,9 +41,8 @@ immer
   \emph{The Design of Experiments.} 4th edition. Edinburgh: Oliver and Boyd.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \examples{
 immer.aov <- aov(cbind(Y1,Y2) ~ Loc + Var, data = immer)
diff -pruN 7.3-57-1/man/Insurance.Rd 7.3-58.1-1/man/Insurance.Rd
--- 7.3-57-1/man/Insurance.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/Insurance.Rd	2022-07-11 11:19:29.000000000 +0000
@@ -48,9 +48,8 @@ Insurance
   Oxford University Press.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \examples{
 ## main-effects fit as Poisson GLM with offset
diff -pruN 7.3-57-1/man/mammals.Rd 7.3-58.1-1/man/mammals.Rd
--- 7.3-57-1/man/mammals.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/mammals.Rd	2022-07-11 11:16:50.000000000 +0000
@@ -38,8 +38,7 @@ mammals
   \emph{Science} \bold{194}, 732--734.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/mcycle.Rd 7.3-58.1-1/man/mcycle.Rd
--- 7.3-57-1/man/mcycle.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/mcycle.Rd	2022-07-11 11:17:06.000000000 +0000
@@ -29,8 +29,7 @@ mcycle
   \emph{Journal of the Royal Statistical Society series B} \bold{47}, 1--52.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/negative.binomial.Rd 7.3-58.1-1/man/negative.binomial.Rd
--- 7.3-57-1/man/negative.binomial.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/negative.binomial.Rd	2022-07-11 11:17:25.000000000 +0000
@@ -34,9 +34,8 @@ negative.binomial(theta = stop("'theta'
   \code{\link{summary.negbin}}
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \examples{
 # Fitting a Negative Binomial model to the quine data
diff -pruN 7.3-57-1/man/Rubber.Rd 7.3-58.1-1/man/Rubber.Rd
--- 7.3-57-1/man/Rubber.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/Rubber.Rd	2022-07-11 11:18:35.000000000 +0000
@@ -35,8 +35,7 @@ Rubber
   4th edition, Longmans, Table 8.1 p. 239.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/snails.Rd 7.3-58.1-1/man/snails.Rd
--- 7.3-57-1/man/snails.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/snails.Rd	2022-07-11 11:18:19.000000000 +0000
@@ -50,8 +50,7 @@ snails
   Zoology Department, The University of Adelaide.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/steam.Rd 7.3-58.1-1/man/steam.Rd
--- 7.3-57-1/man/steam.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/steam.Rd	2022-07-11 11:17:50.000000000 +0000
@@ -28,8 +28,7 @@ steam
   \emph{Applied Regression Analysis.} Wiley, pp. 518--9.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/survey.Rd 7.3-58.1-1/man/survey.Rd
--- 7.3-57-1/man/survey.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/survey.Rd	2022-07-11 11:10:05.000000000 +0000
@@ -1,5 +1,5 @@
 % file MASS/man/survey.Rd
-% copyright (C) 1994-9 W. N. Venables and B. D. Ripley
+% copyright (C) 1994-2022 W. N. Venables and B. D. Ripley
 %
 \name{survey}
 \alias{survey}
@@ -63,7 +63,7 @@ survey
   }
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/Traffic.Rd 7.3-58.1-1/man/Traffic.Rd
--- 7.3-57-1/man/Traffic.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/Traffic.Rd	2022-07-11 11:12:50.000000000 +0000
@@ -41,8 +41,7 @@ Traffic
   \emph{Annals of Statistics,} \bold{9}, 697--704.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/UScereal.Rd 7.3-58.1-1/man/UScereal.Rd
--- 7.3-57-1/man/UScereal.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/UScereal.Rd	2022-07-11 11:13:10.000000000 +0000
@@ -59,8 +59,7 @@ UScereal
   \url{http://lib.stat.cmu.edu/datasets/1993.expo/}.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/man/UScrime.Rd 7.3-58.1-1/man/UScrime.Rd
--- 7.3-57-1/man/UScrime.Rd	2012-05-15 23:17:48.000000000 +0000
+++ 7.3-58.1-1/man/UScrime.Rd	2022-07-11 11:13:29.000000000 +0000
@@ -79,8 +79,7 @@ UScrime
   US National Academy of Sciences.
 }
 \references{
-  Venables, W. N. and Ripley, B. D. (1999)
-  \emph{Modern Applied Statistics with S-PLUS.} Third
-  Edition. Springer.
+  Venables, W. N. and Ripley, B. D. (2002)
+  \emph{Modern Applied Statistics with S-PLUS.} Fourth Edition. Springer.
 }
 \keyword{datasets}
diff -pruN 7.3-57-1/MD5 7.3-58.1-1/MD5
--- 7.3-57-1/MD5	2022-04-22 11:45:27.000000000 +0000
+++ 7.3-58.1-1/MD5	2022-08-03 15:06:59.000000000 +0000
@@ -1,7 +1,8 @@
-37e8e45658ca2512e47990c80e3fe867 *DESCRIPTION
+016d1fff541af35c1be2f1f9b2bab69b *ChangeLog
+3feb31992fd16f6f1516af268bf95cca *DESCRIPTION
 35aff05a505ecf7e81e0473767794ca9 *INDEX
 c7acdc0fa828f781a0a5586ab9d4fa1b *LICENCE.note
-3c2dfc5f75d8a5a108ce9a1948aaf8dc *NAMESPACE
+3058570082fa395ff650dacb82f17442 *NAMESPACE
 aed71ed40bb9bfdd7d19edfdbd163087 *R/add.R
 667178114b2cc60142fed7fc16c00f90 *R/area.R
 2b449dd3fde83489799ef5f72bc8ead0 *R/boxcox.R
@@ -15,7 +16,7 @@ bca9a041d73f25376018c9e4cca65922 *R/cov.
 81f2b80d082acd4bf2cdcdf581277cc1 *R/fitdistr.R
 deb0581428073be21384b2fea27457cc *R/fractions.R
 fdd720ed0d234e62ec46ad80ffc5c3f6 *R/gamma.shape.R
-51280f00f8f92b878f6c29bf9d2d9854 *R/glmmPQL.R
+c801774ec1f9e41060eec9bad3417504 *R/glmmPQL.R
 f6c250dc2c0287a0d9a7e577352bc3f1 *R/hist.scott.R
 66ee029442522726306cd7d4a869b725 *R/huber.R
 feed05160fcb53f8d07c559e1afa9873 *R/hubers.R
@@ -46,7 +47,7 @@ f1db7f02de9bae7087fc01a7ffe4748e *R/true
 bbde4307b98d968e9b85d55f46a0cbe6 *R/ucv.R
 29fdbf836b6ebffc562ce7d2b54ab5eb *R/write.matrix.R
 4f74ab00a8fd8a8eaf56957b1e13aa52 *R/zzz.R
-1961639f6f4f7f9efffa91b624b3d060 *build/partial.rdb
+0c6ad5b3446721162c89589e8077ab1c *build/partial.rdb
 e4aa969dc4062a5dfa605a141bf32f29 *data/Aids2.rda
 3c5a57a9f86ee32ac10f6114826a762b *data/Animals.rda
 689cd33a62093be4f53a38cc8405e083 *data/Boston.rda
@@ -152,37 +153,37 @@ ea5dfb16715140492edf278a4c2cb1b6 *inst/s
 d5977faadde512bc29fd49e8d10ab80d *inst/scripts/ch08.R
 8fa4f5b6039ff3883a17226085ed77b8 *inst/scripts/ch09.R
 3c43589522f6f8cd3e338be9cc067918 *inst/scripts/ch10.R
-6d19699220b04f2400f7b2e4c90a6feb *inst/scripts/ch11.R
+bcb3e64e6a1c241e8d78c864ebf588e8 *inst/scripts/ch11.R
 793b62dd2329642c3e5e9af5962a0f59 *inst/scripts/ch12.R
-81629a5320cd986c06164748c66e0cfa *inst/scripts/ch13.R
+ac538e49531483ef589d20da73bbabc1 *inst/scripts/ch13.R
 a7457b4533a20b3ec155fe157b2ed29c *inst/scripts/ch14.R
-caebd3270cdb7268117f8a5a0cddd7be *inst/scripts/ch15.R
+fe7caab9f9c054a1f261cafc2ac90fe0 *inst/scripts/ch15.R
 3a3a57e6adb876a749a48669092ee37b *inst/scripts/ch16.R
 1b78ed518f4fbf6ed3704b0a8463715b *man/Aids2.Rd
-d5b9cf75996ccdc90872d49b2f87cae5 *man/Animals.Rd
+254cff0c5ca4d06b2efab6ceda46e948 *man/Animals.Rd
 e0715295dbeae3214279d07bd1d89116 *man/Boston.Rd
-0ac21fa2c81d16c1e1efdb6b2ca5aea7 *man/Cars93.Rd
+3b3951963e525c7c37d093c4790945f2 *man/Cars93.Rd
 e1cc4debb9ba4982b2a78864d03bf5d7 *man/Cushings.Rd
 5e497af7fdc9b4d6b7e771f3839a0c4e *man/DDT.Rd
 fc4ebf60ca33228804e86cd08ee7b990 *man/GAGurine.Rd
-a4e54a0b5a237fcde8f47b5d82daa8b4 *man/Insurance.Rd
+fe121563de0c24631efbaffaad856cd1 *man/Insurance.Rd
 a6a2cea128307c1138bde4c046fcfb5c *man/MASS-internal.Rd
 fa8c2c8e00a52e7731604be22fafcec6 *man/Melanoma.Rd
 9535c4de30b076e0ba2ec4d1f868b9ac *man/Null.Rd
 9071e3f3ca15b70da7dfed264675d965 *man/OME.Rd
 b3ee04fa917bb291c47d52830d77ffdc *man/Pima.tr.Rd
 a7ba31f8b57db3cbb58b636ec45ad19d *man/Rabbit.Rd
-fe5a281b62e06246a5e043e441257282 *man/Rubber.Rd
+c542b9d655977d4279f267e714581841 *man/Rubber.Rd
 8f350cbf5a680ecd0eaf8bcd8934e2ad *man/SP500.Rd
 d59fb4bdaf0c58b26c3443c7c8c5af70 *man/Sitka.Rd
 4cabfa1e280f74cc87b27664d417fd5b *man/Sitka89.Rd
 c74d63d7d404fa5b71d94b8fa709432e *man/Skye.Rd
-b71d552e44d70d597229eb1360d84476 *man/Traffic.Rd
-301925fbb443e0eb6b58aca56a5457b9 *man/UScereal.Rd
-9fbe1bf1cab5a1568c87457a95b5047a *man/UScrime.Rd
+84c2befbabf2142b5372b94d57aaf02b *man/Traffic.Rd
+01ace845290cc6ce0390c3a0f5453fcd *man/UScereal.Rd
+55e272a8527baa10a1f9da76920402ae *man/UScrime.Rd
 182ebb9e30ae5ba85119ce994468e775 *man/VA.Rd
 a73f6ef91062b7bd5009144b5710de5a *man/abbey.Rd
-782206216efe4e320c87191ecdccfc73 *man/accdeaths.Rd
+63ff4eb03236a0da626c040dc88bbe09 *man/accdeaths.Rd
 7de173c292018dc9b23aa17f5f65a41b *man/addterm.Rd
 a5f53921ca9d0b1553c030db03ddfe65 *man/anorexia.Rd
 bc308c384834629fa93aca2fce82f6ff *man/anova.negbin.Rd
@@ -192,10 +193,10 @@ a81030efe33e0a82e2f9e3709b1273b9 *man/ba
 e79ea25d60ba827b71a57f7458f733d2 *man/bcv.Rd
 61fbfe12f436f23b478400e0c085731d *man/beav1.Rd
 9c16e1752eba19b699081c3f7f82db01 *man/beav2.Rd
-1b3cede44318f5ea8feb3c3b457bdc09 *man/biopsy.Rd
+55b0db236ec4393bae165ab49c92ee48 *man/biopsy.Rd
 2f6ba17e14d2daa4afc541d3445190ad *man/birthwt.Rd
 bebc2ad312668d479d67adbb5fd3777d *man/boxcox.Rd
-2ca64d5540ffa5e91f3c8461e6e3124b *man/cabbages.Rd
+1a1233168369b0abcf4e2d207d99dc72 *man/cabbages.Rd
 9a9a2f5323a13a701a74a514785cd771 *man/caith.Rd
 726868057d0e31cad05e01c7b379573c *man/cats.Rd
 017ddc74606e2e08885a718313f9ea6b *man/cement.Rd
@@ -206,15 +207,15 @@ e35fa2f6ee37f213648c7ec087ce8b83 *man/co
 88bb557bbfe7f9a6889f4f01ef7f490f *man/coop.Rd
 4b5232b75977adcc4eafa9823e8d3912 *man/corresp.Rd
 7c046b9650055e52296467fbe378309a *man/cov.rob.Rd
-b1a92f03d6905de2e74059df3a93f334 *man/cov.trob.Rd
+17b3d4c8aa244294ab5f01cdf31d4559 *man/cov.trob.Rd
 795a3a88f04d699ea466dbefb30adfcf *man/cpus.Rd
 1b1a88e76542006a6df88ef82a41d1c9 *man/crabs.Rd
 f320aaa10f4cff23eff1f1414c057eae *man/deaths.Rd
 5b97a49cfb656281f09aa8ec8dd389e2 *man/denumerate.Rd
 4251dd1e5e0570095044c278b4cc2690 *man/dose.p.Rd
-c5683d0ee4538c54e29683c313cf4d20 *man/drivers.Rd
+32d46414b81cc9c21663b07a5b3e24a1 *man/drivers.Rd
 989cb309d961aca2b8d9d54df183223d *man/dropterm.Rd
-a186e33c5945178fa1ca69a433c1bf3b *man/eagles.Rd
+57e48204af505d9d279440f9a75fe46d *man/eagles.Rd
 5d544d4123e89ce9b4404630c3ae53b8 *man/epil.Rd
 df9ff3b3ed9842a6c2d767dfb14233d8 *man/eqscplot.Rd
 d6c9433b3ee2a9fe920dcedecbefdf06 *man/farms.Rd
@@ -226,19 +227,19 @@ e2971220e00d364f968079d07203da26 *man/ga
 a980e6f05828b7c992709a22a23a2f38 *man/gamma.dispersion.Rd
 c1c0977e3730dcc6340a845b0509dff7 *man/gamma.shape.glm.Rd
 3f1ac8a8ecc476a9b8a78d8731a76bce *man/gehan.Rd
-d705175d2d756430ab571ee1c5253118 *man/genotype.Rd
+bfea377b88c51c2483cb09fca89a7967 *man/genotype.Rd
 353d48920fe6e849fb2e0a757d277901 *man/geyser.Rd
 a81ca88a2a39298dd099c015fdd3c167 *man/gilgais.Rd
-cd1607060ff90b41e5fd22b3b058d5e9 *man/ginv.Rd
+9b36e4d9f64bd4a4629a98d709fb8752 *man/ginv.Rd
 67ac548358fe00a107e17c7101fb4552 *man/glm.convert.Rd
 68625209b126bf126b0a7cad4e6c5508 *man/glm.nb.Rd
-b4003214294743d98c209ea23eb53c19 *man/glmmPQL.Rd
+b07145bdfcdcf3d621483562aab95335 *man/glmmPQL.Rd
 e65737579ca1cd2810198d72f0260e21 *man/hills.Rd
 5440204f0acdca119adda063b91d9e17 *man/hist.scott.Rd
 4b3d83cc89b49bdbf178503b6fa33dd3 *man/housing.Rd
 3ff54e8dfc1c1b949d3a33fcbd916fee *man/huber.Rd
 7cb24fac3e55b03ac894c3be943287bf *man/hubers.Rd
-bcc1aae22252614560be9bc37fffb161 *man/immer.Rd
+606105b6a9c526833a3116619a07d9c9 *man/immer.Rd
 f5e6f603789ab4838cd41e009e0890eb *man/isoMDS.Rd
 be8257b0890c6c52c5faf72cdf1781b5 *man/kde2d.Rd
 f2aec533ce897bd9f2e53ced57697ed0 *man/lda.Rd
@@ -250,16 +251,16 @@ f509645d4aa94d7b27e4537542daad97 *man/ld
 82b7f4c063c79b490fe7e02d261ddbb7 *man/loglm1.Rd
 4ccf847b74d8eabfa2608f644a1a5f5c *man/logtrans.Rd
 59c78564e95b8d79447af0f21ed60bc9 *man/lqs.Rd
-2a0b5dd4c71cf01dfc1894be0e8f759b *man/mammals.Rd
+fbec6bc6908ad65e919c06945c4d6b42 *man/mammals.Rd
 9fbb7d21860ae43c710d73e78d68741f *man/mca.Rd
-2f262617ef9117ab6d2fdedcdb243913 *man/mcycle.Rd
+2ef0781ce1fcb86d8362de7d6f8b41fe *man/mcycle.Rd
 b80802b32e6e02f772806bbcf21a6ad6 *man/menarche.Rd
 cb0833e592bf5cd241499c439c69a002 *man/michelson.Rd
 f8a1e349fbe9051ba75a935ba2803149 *man/minn38.Rd
 2b7e747f5cf31f4ba254a7868773c9ba *man/motors.Rd
 6dba6358bce7917dc3262ee2dd120636 *man/muscle.Rd
 6a8457e7526c032ff7e0a42e6fdc0e09 *man/mvrnorm.Rd
-fbf5b11e7ed253d29500bac780e2e794 *man/negative.binomial.Rd
+4f4344c6079fb07aa9e9387c4f3610c9 *man/negative.binomial.Rd
 c73e2dbd1f3749c2a85df1c993699d9f *man/newcomb.Rd
 0d589532d9330eedf9abb57688afdab6 *man/nlschools.Rd
 9e1448db88f35cf2fe22a0b358514a3c *man/npk.Rd
@@ -294,16 +295,16 @@ d1d51c68168df1699f03e03c922b1a3a *man/sh
 622b42b7de01cd0d290f57a0b9086402 *man/shoes.Rd
 8e8dfdcbc8597b5bccdf2728316e73dd *man/shrimp.Rd
 ba511bdea2ec00b3962296a3b6cd7cde *man/shuttle.Rd
-6fecb36e859210cc8e28f1d71d5c3a7b *man/snails.Rd
+6064eef40585742c5f7801525311b6dd *man/snails.Rd
 751d64a2da0a7ff44cdb9a8ff520ccd8 *man/stdres.Rd
-ff7bd7ff1c80f2b1206305a051376ba0 *man/steam.Rd
+c7cfb9197843a5cbd76e866013fbcce0 *man/steam.Rd
 3220d80bbff1399f7435c48def2a7f01 *man/stepAIC.Rd
 6f7889f5e4478412a523eedaefdc91aa *man/stormer.Rd
 87595689a17d00aa5b5e98845be4ca1c *man/studres.Rd
 9120d03a6f70c2ffaf8c38ca75591429 *man/summary.loglm.Rd
 1d714038b6e5bc7641181331d095e989 *man/summary.negbin.Rd
 b70f43a1c1766f0e3dc2ed66bebabd1c *man/summary.rlm.Rd
-e68bc524ad07b0ab7cb5cdf7a53f4759 *man/survey.Rd
+156b0a165f0f7ced7f97ef8743aae7bb *man/survey.Rd
 3c044bf1596134e8329f1f9aca07b7aa *man/synth.tr.Rd
 760b565cac1dcc4db7b25f77950c71b8 *man/theta.md.Rd
 819320fb15b6ddb76e79f7f1a8f7d5c1 *man/topo.Rd
@@ -320,20 +321,22 @@ ceefe8e558dfa70a28f54fcae1ca3df0 *man/wh
 2f300df61a52b6d876d9ebadcc447cd2 *po/R-it.po
 1191b3abb0caad62ecd5e4ad544361c4 *po/R-ko.po
 b6e225a125d6368318896f92ffd91e0f *po/R-pl.po
-020be0ec5305b41949da681312f305cb *src/MASS.c
-c4ed0a42234771cb07d140e375edc23f *src/lqs.c
+f47fd24f72996b91d2a1618cd105c908 *src/MASS.c
+2c7b72ca038d349935bcb4f60235bcd7 *src/lqs.c
 7b1360150b8598b576e82534b12345a2 *tests/BankWages.rda
-31c485d8c85fdda93c7248b83e0f1bbb *tests/Examples/MASS-Ex.Rout.save
-d87553db40364fdc9c337fa31c009b17 *tests/confint.R
+ec6ef25ee362a716d1d40d7906594ff0 *tests/Examples/MASS-Ex.Rout.save
+a309c9e287f72ae6fc239b0495d5685e *tests/confint.R
 e059b0451b55d1e8cb8ebf51ecce76ea *tests/cov.mcd.R
 a0854fee9b36691ca1d0880da31d6f79 *tests/fitdistr.R
 55c6f4de353b9479359459d2718a017e *tests/fitdistr.Rout.save
 afd4f607cba7fda8ec4d22bffd88fc50 *tests/glm.nb.R
+66acc18a93bc61e7f59fd9419a9e18a8 *tests/glmmPQL.R
 7fea2161b12d01c8940107342815dd0e *tests/hubers.R
 7f6efdd17aea2750feda4db0abd46d48 *tests/lme.R
-edee76adc2d27e4ba90f1ff79360148b *tests/polr.R
+274e2255e4054f8a5adf5c0d9035d3a0 *tests/polr.R
 f4e6b3ffb6521ea7625515e2f0ae7f98 *tests/profile.R
 a23ddf89e02a02ed030e4ed5538d3430 *tests/regression.R
 51c912fb8fac4844110b52651f79a8e8 *tests/regression.Rout.save
 f2eeba77216158f02085ec4f29e586c0 *tests/rlm.R
-f5fd08eb22747dbe31443bc3560cfa2d *tests/scripts.R
+0ed8f9c655ec870a37a89a759e40061f *tests/scripts.R
+83342e7163a9298e6944b17eb3bcab36 *tests/solr.rda
diff -pruN 7.3-57-1/NAMESPACE 7.3-58.1-1/NAMESPACE
--- 7.3-57-1/NAMESPACE	2022-03-25 16:36:42.000000000 +0000
+++ 7.3-58.1-1/NAMESPACE	2022-07-05 12:12:54.000000000 +0000
@@ -38,7 +38,6 @@ export(cov.mcd, cov.mve, cov.rob, lmsreg
 importFrom(grDevices, dev.flush, dev.hold, nclass.FD, nclass.scott, palette)
 importFrom(graphics, abline, axis, box, frame, hist, lines, matplot, mtext,
            pairs, par, plot, points, rect, segments, symbols, text)
-#import(stats) # triggers bug in wmtsa
 importFrom(stats, add1, anova, biplot, coef, confint, drop1,
 	   extractAIC, family, fitted, logLik, model.frame, nobs,
 	   predict, profile, residuals, se.contrast, simulate, terms,
@@ -56,7 +55,9 @@ importFrom(stats, add1, anova, biplot, c
            napredict, naprint, naresid, optim, optimize, pcauchy,
            pchisq, pf, plogis, pnorm, qchisq, qf, qnorm, qt, quantile,
            rcauchy, rexp, rgamma, rlogis, rnorm, rpois, runif, sd,
-           spline, summary.glm, uniroot, update.formula, var)
+           spline, summary.glm, uniroot, update.formula, var,
+           ## added in 7.3-58
+           drop.terms, reformulate)
 
 S3method("[", fractions)
 S3method("[<-", fractions)
diff -pruN 7.3-57-1/R/glmmPQL.R 7.3-58.1-1/R/glmmPQL.R
--- 7.3-57-1/R/glmmPQL.R	2022-03-25 16:36:03.000000000 +0000
+++ 7.3-58.1-1/R/glmmPQL.R	2022-07-27 05:04:17.000000000 +0000
@@ -32,14 +32,17 @@ glmmPQL <- function(fixed, random, famil
     for(i in nm[!keep]) m[[i]] <- NULL
     allvars <-
         if (is.list(random))
-            allvars <- c(all.vars(fixed), names(random),
-                         unlist(lapply(random, function(x) all.vars(formula(x)))))
+            c(all.vars(fixed), names(random),
+              unlist(lapply(random, function(x) all.vars(formula(x)))))
         else c(all.vars(fixed), all.vars(random))
     ## allvars does not contain offset term.
     Terms <- if(missing(data)) terms(fixed) else terms(fixed, data = data)
-    off <- attr(Terms, "offset")
-    if(length(off<- attr(Terms, "offset"))) allvars <-
-        c(allvars, as.character(attr(Terms, "variables"))[off+1])
+    offt <- attr(Terms, "offset")
+    have_offset <- length(offt) >= 1L
+    if(have_offset) {
+        offvars <- as.character(attr(Terms, "variables"))[offt + 1L]
+        allvars <- c(allvars, offvars)
+    }
     ## add variables in correlation argument, if any
     if (!missing(correlation) && !is.null(attr(correlation,"formula")))
         allvars <- c(allvars, all.vars(attr(correlation,"formula")))
@@ -52,10 +55,19 @@ glmmPQL <- function(fixed, random, famil
     mf <- eval.parent(m)
     off <- model.offset(mf)
     if(is.null(off)) off <- 0
+    ## as from 2022-04, nlme refuses fixed with offsets,
+    ## rather than ignoring them.
+    fixed2 <-
+        if(have_offset) {
+            tf <- drop.terms(Terms, offt, keep.response = TRUE)
+            reformulate(attr(tf,"term.labels"), response = fixed[[2L]],
+                        intercept = attr(tf, "intercept"),
+                        env = environment(fixed))
+        } else fixed
     wts <-  model.weights(mf)
     if(is.null(wts)) wts <- rep(1, nrow(mf))
     mf$wts <- wts
-    fit0 <- glm(formula=fixed, family=family, data=mf, weights = wts, ...)
+    fit0 <- glm(formula = fixed, family = family, data = mf, weights = wts, ...)
     w <- fit0$prior.weights
     eta <- fit0$linear.predictors
     zz <- eta + fit0$residuals - off
@@ -66,8 +78,8 @@ glmmPQL <- function(fixed, random, famil
     keep <- is.element(nm, c("fixed", "random", "data", "subset",
                              "na.action", "control"))
     for(i in nm[!keep]) mcall[[i]] <- NULL
-    fixed[[2L]] <- quote(zz)
-    mcall[["fixed"]] <- fixed
+    fixed2[[2L]] <- quote(zz)
+    mcall[["fixed"]] <- fixed2
     mcall[[1L]] <- quote(nlme::lme)
     mcall$random <- random
     mcall$method <- "ML"
@@ -96,6 +108,13 @@ glmmPQL <- function(fixed, random, famil
     fit$call <- Call
     fit$family <- family
     fit$logLik <- as.numeric(NA)
+    if(have_offset) {
+        ## fit$fitted is a matrix
+        fit$fitted <- fit$fitted + off # will recycle
+        fit$have_offset <- TRUE
+        fit$fixed2 <- fixed2
+        fit$offvars <- offvars
+    }
     oldClass(fit) <- c("glmmPQL", oldClass(fit))
     fit
 }
@@ -105,7 +124,7 @@ predict.glmmPQL <-
            level = Q, na.action = na.pass, ...)
 {
     type <- match.arg(type)
-    Q <- object$dims$Q
+    Q <- object$dims$Q # default for level
     if(missing(newdata)) {
         pred <- fitted(object, level = level)
         pred <- switch(type,
@@ -114,9 +133,22 @@ predict.glmmPQL <-
         if(!is.null(object$na.action))
             pred <- napredict(object$na.action, pred)
     } else {
-        class(object) <- class(object)[-1L]
-        pred <- predict(object, newdata, level = level,
-                        na.action = na.action)
+        have_offset <- isTRUE(object$have_offset)
+        class(object) <- class(object)[-1L] # call lme method
+        if(have_offset) {
+            ## remove offset(s) from call
+            mcall <- object$call
+            mcall[["fixed"]] <- object$fixed2
+            object$call <- mcall
+            pred <- predict(object, newdata, level = level,
+                            na.action = na.action)
+            ## Now add back offset(s)
+            offvars <- sub("offset[(]", "", object$offvars)
+            offvars <- sub("[)]", "", offvars)
+            for (n in offvars) pred <- pred + eval(as.name(n), newdata)
+        } else
+            pred <- predict(object, newdata, level = level,
+                            na.action = na.action)
         switch(type,
                response = {pred <- object$family$linkinv(pred)},
                link =)
diff -pruN 7.3-57-1/src/lqs.c 7.3-58.1-1/src/lqs.c
--- 7.3-57-1/src/lqs.c	2022-04-11 10:02:39.000000000 +0000
+++ 7.3-58.1-1/src/lqs.c	2022-04-22 17:01:31.000000000 +0000
@@ -72,11 +72,13 @@ static void sample_noreplace(int *x, int
 /*
    Find all subsets of size k of n in order: this gets a new one each call
  */
-// mis-compiled by GCC 11.[012] at -O3, so avoid it.
+// mis-compiled by GCC 11.[012] at -O3, so avoid it. 11.3 should be OK.
 // also GCC pre-12 at -O2 only up to Apr 2022 so releases should be OK.
-#if defined __GNUC__ && __GNUC__ == 12 && __GNUC_MINOR__ < 1
+// clang defines __GNUC__ but not these pragmas,
+// AND uses its version (LLVM or Apple) for __GNUC__
+#if !defined __clang__ && defined __GNUC__ && __GNUC__ == 12 && __GNUC_MINOR__ < 1
 #pragma GCC optimize "-O1"
-#elif defined __GNUC__ && __GNUC__ == 11 && __GNUC_MINOR__ <= 2
+#elif !defined __clang__ && defined __GNUC__ && __GNUC__ == 11 && __GNUC_MINOR__ <= 2
 #pragma GCC optimize "-O2"
 #endif
 static void next_set(int *x, int n, int k)
@@ -86,7 +88,7 @@ static void next_set(int *x, int n, int
     while(j > 0 && x[j] >= n - (k - 1 -j)) tmp = ++x[--j];
     for(int i = j + 1; i < k; i++)  x[i] = ++tmp;
 }
-#if defined __GNUC__
+#if !defined __clang__ && defined __GNUC__
 #pragma GCC reset_options
 #endif
 
diff -pruN 7.3-57-1/src/MASS.c 7.3-58.1-1/src/MASS.c
--- 7.3-57-1/src/MASS.c	2022-01-12 16:14:30.000000000 +0000
+++ 7.3-58.1-1/src/MASS.c	2022-07-06 13:54:15.000000000 +0000
@@ -18,6 +18,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <stddef.h>
+#include <limits.h> // for INT_MAX
 
 #include <R.h>
 #include <R_ext/Applic.h>
@@ -34,8 +35,8 @@
  */
 
 void
-VR_sammon(double *dd, Sint *nn, Sint *kd, double *Y, Sint *niter,
-	  double *stress, Sint *trace, double *aa, double *tol)
+VR_sammon(double *dd, int *nn, int *kd, double *Y, int *niter,
+	  double *stress, int *trace, double *aa, double *tol)
 {
     int   i, j, k, m, n = *nn, nd = *kd;
     double *xu, *xv, *e1, *e2;
@@ -165,11 +166,11 @@ CORRECT:
  *
  */
 
-static Sint *ord;		/* ranks of dissimilarities */
-static Sint *ord2;		/* inverse ordering (which one is rank i?) */
-static Sint n;			/* number of  dissimilarities */
-static Sint nr;			/* number of data points */
-static Sint nc;			/* # cols of  fitted configuration */
+static int *ord;		/* ranks of dissimilarities */
+static int *ord2;		/* inverse ordering (which one is rank i?) */
+static int n;			/* number of  dissimilarities */
+static int nr;			/* number of data points */
+static int nc;			/* # cols of  fitted configuration */
 static int dimx;		/* Size of configuration array */
 static double *x;		/* configuration */
 static double *d;		/* dissimilarities */
@@ -178,15 +179,15 @@ static double *yf;		/* isotonic regressi
 static double mink_pow;
 
 void
-VR_mds_fn(double *, double *, Sint *, double *, Sint *,
-	  double *, Sint *, Sint *, double *, Sint *, double *);
+VR_mds_fn(double *, double *, int *, double *, int *,
+	  double *, int *, int *, double *, int *, double *);
 
 /*
  *  Download the data.
  */
 void
-VR_mds_init_data(Sint *pn, Sint *pc, Sint *pr, Sint *orde,
-		 Sint *ordee, double *xx, double *p)
+VR_mds_init_data(int *pn, int *pc, int *pr, int *orde,
+		 int *ordee, double *xx, double *p)
 {
     int   i;
 
@@ -194,8 +195,8 @@ VR_mds_init_data(Sint *pn, Sint *pc, Sin
     nr = *pr;
     nc = *pc;
     dimx = nr * nc;
-    ord = R_Calloc(n, Sint);
-    ord2 = R_Calloc(n, Sint);
+    ord = R_Calloc(n, int);
+    ord2 = R_Calloc(n, int);
     x = R_Calloc(dimx, double);
     d = R_Calloc(n, double);
     y = R_Calloc(n, double);
@@ -237,7 +238,7 @@ static double
 fminfn(int nn, double *x, void *dummy)
 {
     double ssq;
-    Sint  do_derivatives = 0;
+    int  do_derivatives = 0;
 
     calc_dist(x);
     VR_mds_fn(y, yf, &n, &ssq, ord2, x, &nr, &nc, 0, &do_derivatives, 
@@ -249,7 +250,7 @@ static void
 fmingr(int nn, double *x, double *der, void *dummy)
 {
     double ssq;
-    Sint  do_derivatives = 1;
+    int  do_derivatives = 1;
 
     calc_dist(x);
     VR_mds_fn(y, yf, &n, &ssq, ord2, x, &nr, &nc, der, &do_derivatives, 
@@ -260,7 +261,7 @@ fmingr(int nn, double *x, double *der, v
 #define REPORT		5
 
 void
-VR_mds_dovm(double *val, Sint *maxit, Sint *trace, double *xx, double *tol)
+VR_mds_dovm(double *val, int *maxit, int *trace, double *xx, double *tol)
 {
     int   i, ifail, fncount, grcount, *mask;
 
@@ -277,9 +278,9 @@ VR_mds_dovm(double *val, Sint *maxit, Si
  */
 
 void
-VR_mds_fn(double *y, double *yf, Sint *pn, double *pssq, Sint *pd,
-	  double *x, Sint *pr, Sint *pncol, double *der,
-	  Sint *do_derivatives, double *p)
+VR_mds_fn(double *y, double *yf, int *pn, double *pssq, int *pd,
+	  double *x, int *pr, int *pncol, double *der,
+	  int *do_derivatives, double *p)
 {
     int   n = *pn, i, ip=0, known, u, s, r = *pr, ncol = *pncol, k=0;
     double tmp, tmp1, sgn, ssq, *yc, slope, tstar, sstar, mink = *p;
@@ -353,10 +354,10 @@ VR_mds_fn(double *y, double *yf, Sint *p
 /* Formulae (6.67) and (6.69) of Scott (1992), the latter corrected. */
 
 void
-VR_ucv_bin(Sint *n, Sint *nb, Sfloat *d, Sint *x, Sfloat *h, Sfloat *u)
+VR_ucv_bin(int *n, int *nb, double *d, int *x, double *h, double *u)
 {
     int   i, nn = *n, nbin = *nb;
-    Sfloat delta, hh = (*h) / 4, sum, term;
+    double delta, hh = (*h) / 4, sum, term;
 
     sum = 0.0;
     for (i = 0; i < nbin; i++) {
@@ -370,10 +371,10 @@ VR_ucv_bin(Sint *n, Sint *nb, Sfloat *d,
 }
 
 void
-VR_bcv_bin(Sint *n, Sint *nb, Sfloat *d, Sint *x, Sfloat *h, Sfloat *u)
+VR_bcv_bin(int *n, int *nb, double *d, int *x, double *h, double *u)
 {
     int   i, nn = *n, nbin = *nb;
-    Sfloat delta, hh = (*h) / 4, sum, term;
+    double delta, hh = (*h) / 4, sum, term;
 
     sum = 0.0;
     for (i = 0; i < nbin; i++) {
@@ -388,10 +389,10 @@ VR_bcv_bin(Sint *n, Sint *nb, Sfloat *d,
 
 
 void
-VR_phi4_bin(Sint *n, Sint *nb, Sfloat *d, Sint *x, Sfloat *h, Sfloat *u)
+VR_phi4_bin(int *n, int *nb, double *d, int *x, double *h, double *u)
 {
     int   i, nn = *n, nbin = *nb;
-    Sfloat delta, sum, term;
+    double delta, sum, term;
 
     sum = 0.0;
     for (i = 0; i < nbin; i++) {
@@ -406,10 +407,10 @@ VR_phi4_bin(Sint *n, Sint *nb, Sfloat *d
 }
 
 void
-VR_phi6_bin(Sint *n, Sint *nb, Sfloat *d, Sint *x, Sfloat *h, Sfloat *u)
+VR_phi6_bin(int *n, int *nb, double *d, int *x, double *h, double *u)
 {
     int   i, nn = *n, nbin = *nb;
-    Sfloat delta, sum, term;
+    double delta, sum, term;
 
     sum = 0.0;
     for (i = 0; i < nbin; i++) {
@@ -425,10 +426,10 @@ VR_phi6_bin(Sint *n, Sint *nb, Sfloat *d
 }
 
 void
-VR_den_bin(Sint *n, Sint *nb, Sfloat *d, Sfloat *x, Sint *cnt)
+VR_den_bin(int *n, int *nb, double *d, double *x, int *cnt)
 {
     int   i, j, ii, jj, iij, nn = *n;
-    Sfloat xmin, xmax, rang, dd;
+    double xmin, xmax, rang, dd;
 
     for (i = 0; i < *nb; i++) cnt[i] = 0;
     xmin = xmax = x[0];
diff -pruN 7.3-57-1/tests/confint.R 7.3-58.1-1/tests/confint.R
--- 7.3-57-1/tests/confint.R	2012-05-15 23:17:47.000000000 +0000
+++ 7.3-58.1-1/tests/confint.R	2022-07-09 12:51:31.000000000 +0000
@@ -1,4 +1,5 @@
 library(MASS)
+pdf("confint.pdf")
 
 PropCI <- function(x, n, conf = 0.95)
 {
diff -pruN 7.3-57-1/tests/Examples/MASS-Ex.Rout.save 7.3-58.1-1/tests/Examples/MASS-Ex.Rout.save
--- 7.3-57-1/tests/Examples/MASS-Ex.Rout.save	2022-04-16 16:17:23.000000000 +0000
+++ 7.3-58.1-1/tests/Examples/MASS-Ex.Rout.save	2022-07-05 12:10:31.000000000 +0000
@@ -1,7 +1,7 @@
 
-R Under development (unstable) (2022-04-16 r82193) -- "Unsuffered Consequences"
+R Under development (unstable) (2022-07-05 r82545) -- "Unsuffered Consequences"
 Copyright (C) 2022 The R Foundation for Statistical Computing
-Platform: aarch64-apple-darwin21.4.0 (64-bit)
+Platform: aarch64-apple-darwin21.5.0 (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -1013,11 +1013,11 @@ First canonical correlation(s): 0.446368
 
  Row scores:
        blue       light      medium        dark 
--0.89679252 -0.98731818  0.07530627  1.57434710 
+ 0.89679252  0.98731818 -0.07530627 -1.57434710 
 
  Column scores:
        fair         red      medium        dark       black 
--1.21871379 -0.52257500 -0.09414671  1.31888486  2.45176017 
+ 1.21871379  0.52257500  0.09414671 -1.31888486 -2.45176017 
 > ## IGNORE_RDIFF_END
 > dimnames(caith)[[2]] <- c("F", "R", "M", "D", "B")
 > par(mfcol=c(1,3))
@@ -1182,11 +1182,11 @@ First canonical correlation(s): 0.446368
 
  Row scores:
        blue       light      medium        dark 
--0.89679252 -0.98731818  0.07530627  1.57434710 
+ 0.89679252  0.98731818 -0.07530627 -1.57434710 
 
  Column scores:
        fair         red      medium        dark       black 
--1.21871379 -0.52257500 -0.09414671  1.31888486  2.45176017 
+ 1.21871379  0.52257500  0.09414671 -1.31888486 -2.45176017 
 > biplot(corresp(caith, nf = 2))
 > ## IGNORE_RDIFF_END
 > 
@@ -2216,7 +2216,6 @@ Residual Deviance: 50.09 	AIC: 215.9
 > 
 > ### ** Examples
 > 
-> library(nlme) # will be loaded automatically if omitted
 > summary(glmmPQL(y ~ trt + I(week > 2), random = ~ 1 | ID,
 +                 family = binomial, data = bacteria))
 iteration 1
@@ -2257,12 +2256,89 @@ Standardized Within-Group Residuals:
 Number of Observations: 220
 Number of Groups: 50 
 > 
+> ## an example of an offset: the coefficient of 'week' changes by one.
+> summary(glmmPQL(y ~ trt + week, random = ~ 1 | ID,
++                family = binomial, data = bacteria))
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+iteration 6
+Linear mixed-effects model fit by maximum likelihood
+  Data: bacteria 
+  AIC BIC logLik
+   NA  NA     NA
+
+Random effects:
+ Formula: ~1 | ID
+        (Intercept)  Residual
+StdDev:    1.325243 0.7903088
+
+Variance function:
+ Structure: fixed weights
+ Formula: ~invwt 
+Fixed effects:  y ~ trt + week 
+                 Value Std.Error  DF   t-value p-value
+(Intercept)  3.0302276 0.4791396 169  6.324310  0.0000
+trtdrug     -1.2176812 0.6160113  47 -1.976719  0.0540
+trtdrug+    -0.7886376 0.6193895  47 -1.273250  0.2092
+week        -0.1446463 0.0392343 169 -3.686730  0.0003
+ Correlation: 
+         (Intr) trtdrg trtdr+
+trtdrug  -0.622              
+trtdrug+ -0.609  0.464       
+week     -0.481  0.050  0.030
+
+Standardized Within-Group Residuals:
+       Min         Q1        Med         Q3        Max 
+-4.2868074  0.2039043  0.3140333  0.5440835  1.9754065 
+
+Number of Observations: 220
+Number of Groups: 50 
+> summary(glmmPQL(y ~ trt + week + offset(week), random = ~ 1 | ID,
++                 family = binomial, data = bacteria))
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+iteration 6
+Linear mixed-effects model fit by maximum likelihood
+  Data: bacteria 
+  AIC BIC logLik
+   NA  NA     NA
+
+Random effects:
+ Formula: ~1 | ID
+        (Intercept)  Residual
+StdDev:    1.325243 0.7903088
+
+Variance function:
+ Structure: fixed weights
+ Formula: ~invwt 
+Fixed effects:  y ~ trt + week + offset(week) 
+                 Value Std.Error  DF    t-value p-value
+(Intercept)  3.0302276 0.4791396 169   6.324310  0.0000
+trtdrug     -1.2176812 0.6160113  47  -1.976719  0.0540
+trtdrug+    -0.7886376 0.6193895  47  -1.273250  0.2092
+week        -1.1446463 0.0392343 169 -29.174622  0.0000
+ Correlation: 
+         (Intr) trtdrg trtdr+
+trtdrug  -0.622              
+trtdrug+ -0.609  0.464       
+week     -0.481  0.050  0.030
+
+Standardized Within-Group Residuals:
+       Min         Q1        Med         Q3        Max 
+-4.2868074  0.2039043  0.3140333  0.5440835  1.9754065 
+
+Number of Observations: 220
+Number of Groups: 50 
+> 
 > 
 > 
 > cleanEx()
-
-detaching ‘package:nlme’
-
 > nameEx("housing")
 > ### * housing
 > 
@@ -5074,7 +5150,7 @@ Achieved convergence tolerance: 4.318e-0
 > cleanEx()
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  2.21 0.101 2.315 0 0 
+Time elapsed:  2.293 0.108 2.438 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff -pruN 7.3-57-1/tests/glmmPQL.R 7.3-58.1-1/tests/glmmPQL.R
--- 7.3-57-1/tests/glmmPQL.R	1970-01-01 00:00:00.000000000 +0000
+++ 7.3-58.1-1/tests/glmmPQL.R	2022-07-27 05:27:33.000000000 +0000
@@ -0,0 +1,64 @@
+### example of glmmPQL with offset.
+
+### glmmPQL age structured sole egg data example
+### from "GAMs:An Intro with R" by Simon Wood
+
+library(MASS)
+if(!requireNamespace("nlme", quietly = TRUE)) q("no")
+
+options(warn = 2L)
+## Chapter 2 stuff...
+
+if(FALSE) { ## script to create solr
+#require(gamair) # for 'data(sole)'
+data(sole)
+sole$off <- log(sole$a.1 - sole$a.0) # model offset term
+sole$a <-(sole$a.1 + sole$a.0)/2     # mean stage age
+solr <- sole                         # make copy for rescaling
+solr$t <- solr$t-mean(sole$t)
+solr$t <- solr$t/var(sole$t)^0.5
+solr$la <- solr$la - mean(sole$la)
+solr$lo <- solr$lo - mean(sole$lo)
+save(solr, file = "solr.rda", version = 2)
+} else load("solr.rda")
+
+solr$station <- factor(with(solr, paste0(-la, -lo, -t)))
+b <- glmmPQL(eggs ~ offset(off) + lo + la + t + I(lo*la) + I(lo^2) +
+            I(la^2) + I(t^2) + I(lo*t) + I(la*t) + I(lo^3) + I(la^3) +
+            I(t^3) + I(lo*la*t) + I(lo^2*la) + I(lo*la^2) + I(lo^2*t) +
+            I(la^2*t) + I(la*t^2) + I(lo*t^2) + a + I(a*t) + I(t^2*a),
+            random = list(station = ~1),
+            family = quasi(link = log, variance = "mu"),
+            data = solr)
+summary(b)
+
+b1 <- update(b, ~ . - I(lo*la*t))
+summary(b1)
+
+b2 <- update(b1, ~ . - I(lo*t))
+summary(b2)
+
+b3 <- update(b2, ~ . - I(lo^2*t))
+summary(b3)
+
+b4 <- update(b3, ~ . - I(la*t^2))
+summary(b4)
+
+pdf("glmmPQL.pdf")
+fv <- exp(fitted(b4))    # fitted values include offset from 3.1-158
+resid <- solr$eggs - fv  # raw residuals
+sqrt_fv <- sqrt(fv)
+plot(sqrt_fv, sqrt(solr$eggs))
+abline(0, 1, lwd = 2)
+plot(sqrt_fv, resid/sqrt_fv)
+plot(sqrt_fv, resid)
+fl <- sort(sqrt_fv)
+## add 1 s.d. and 2 s.d. reference lines
+lines(fl, fl); lines(fl, -fl); lines(fl, 2 * fl, lty = 2)
+lines(fl, -2 * fl, lty = 2)
+
+nlme::intervals(b4, which = "var-cov")
+
+head(p1 <- predict(b))
+head(p2 <- predict(b, solr))
+all.equal(p1, p2, check.attributes = FALSE)
diff -pruN 7.3-57-1/tests/polr.R 7.3-58.1-1/tests/polr.R
--- 7.3-57-1/tests/polr.R	2012-10-02 10:28:35.000000000 +0000
+++ 7.3-58.1-1/tests/polr.R	2022-07-20 12:22:56.000000000 +0000
@@ -1,5 +1,7 @@
 ## tests from David Firth 2004-Oct-13
 
+pdf("polr.pdf")
+
 library(MASS)
 y <- structure(as.integer(c(1, 2, 3, 1, 2, 3)), .Label = c("1", "2", "3"),
                class = c("ordered", "factor"))
diff -pruN 7.3-57-1/tests/scripts.R 7.3-58.1-1/tests/scripts.R
--- 7.3-57-1/tests/scripts.R	2012-05-15 23:17:47.000000000 +0000
+++ 7.3-58.1-1/tests/scripts.R	2022-07-09 16:40:31.000000000 +0000
@@ -1,3 +1,7 @@
+### This requires packages not declared in Suggests (and not otherwise used)
+## GLMMGibbs Kernsmooth boot e1071 fastICA gee interp lattice mda
+## mgcv multcomp nlme nnet polsplin rpart spatial splines tree
+
 if(!nzchar(Sys.getenv("MASS_TESTING"))) q("no")
 unlink("scripts", recursive = TRUE)
 dir.create("scripts")
Binary files 7.3-57-1/tests/solr.rda and 7.3-58.1-1/tests/solr.rda differ
