[Lme4-commits] r1871 - in pkg/lme4.0: . R man tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 12 17:28:05 CET 2013
Author: mmaechler
Date: 2013-11-12 17:28:04 +0100 (Tue, 12 Nov 2013)
New Revision: 1871
Modified:
pkg/lme4.0/DESCRIPTION
pkg/lme4.0/NAMESPACE
pkg/lme4.0/R/carryOver.R
pkg/lme4.0/man/Dyestuff.Rd
pkg/lme4.0/man/Pastes.Rd
pkg/lme4.0/man/Penicillin.Rd
pkg/lme4.0/man/VerbAgg.Rd
pkg/lme4.0/man/ranef.Rd
pkg/lme4.0/tests/lmer-1.Rout.save
Log:
Depends: Matrix >= 1.1-0; NAMESPACE cosmetics; trying to move lattice to "Imports" and failing:
Because lattice uses S3 generics/methods *and* because we define S4 ones, we cannot allow lattice to mask lme4.0 (namely when lattice is not attached before lme4.0).
Modified: pkg/lme4.0/DESCRIPTION
===================================================================
--- pkg/lme4.0/DESCRIPTION 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/DESCRIPTION 2013-11-12 16:28:04 UTC (rev 1871)
@@ -1,6 +1,6 @@
Package: lme4.0
Version: 0.999999-4
-Date: 2013-09-23
+Date: 2013-11-12
Title: Linear mixed-effects models using S4 classes
Description: Fit linear and generalized linear mixed-effects models.
This is the implementation of lme4 available on CRAN and developed up to 2011.
@@ -14,9 +14,10 @@
Martin Maechler <maechler at R-project.org> and
Ben Bolker <bolker at mcmaster.ca>
Maintainer: Ben Bolker <bbolker+lme4 at gmail.com>
-Depends: methods, R(>= 2.11.1), Matrix(>= 1.0-1), lattice
+Depends: R (>= 2.15.0), methods, Matrix (>= 1.1-0), lattice
+DependsNote: lattice attached *before* lme4.0 because (S3) otherwise masks qqmath
LinkingTo: Matrix, stats
-Imports: graphics, nlme, stats4, stats
+Imports: stats, graphics, stats4, nlme
Suggests: mlmRev, MEMSS, coda, MASS, sfsmisc, MatrixModels
LazyData: yes
License: GPL (>=2)
Modified: pkg/lme4.0/NAMESPACE
===================================================================
--- pkg/lme4.0/NAMESPACE 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/NAMESPACE 2013-11-12 16:28:04 UTC (rev 1871)
@@ -1,7 +1,13 @@
useDynLib(lme4, .registration=TRUE)
-import(Matrix)# including update()
+importClassesFrom("Matrix", corMatrix, dgCMatrix, dpoMatrix)
+importMethodsFrom("Matrix", "%*%", chol, coerce, crossprod, diag,
+ head, tail, summary, t, tcrossprod, update)
+importFrom( "Matrix", cov2cor, .diag2tT, drop0, fac2sparse,
+ rankMatrix, rBind, sparseMatrix)
+
import(lattice)
+##==== (all)
importFrom("methods", setClass, representation,
setMethod, signature, new)
@@ -32,6 +38,10 @@
## re-export imported S4 generics
export(AIC, BIC, logLik)
+## Generics in 'lattice' {we have added own methods}:
+## densityplot, qqmath, xyplot
+
+
## and the rest (S3 generics; regular functions):
export("HPDinterval", "getME",
"isLMM", "isGLMM", "isNLMM",
@@ -62,7 +72,6 @@
"coef",
"coerce",
"confint",
- "densityplot",
"deviance",
"expand",
"fitted",
@@ -76,7 +85,6 @@
"model.matrix",
"plot",
"print",
- "qqmath",
"ranef",
"refit",
"resid", "residuals",
@@ -88,8 +96,8 @@
"update",
"vcov",
"with",
- "xyplot"
- )
+ ## Generics in 'lattice':
+ densityplot, qqmath, xyplot)
S3method(terms, mer)# even though we have it S4 method as well
S3method(drop1, mer)
Modified: pkg/lme4.0/R/carryOver.R
===================================================================
--- pkg/lme4.0/R/carryOver.R 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/R/carryOver.R 2013-11-12 16:28:04 UTC (rev 1871)
@@ -55,7 +55,8 @@
interaction(frms[[1]][[idvar]], frms[[1]][[timevar]], drop = TRUE))
frms <- lapply(frms, function(fr) {ans <- fr[ord,]; rownames(ans) <- NULL; ans})
ans <- list(foo = lapply(frms, function(fr)
- as(Matrix:::fac2sparse(fr[[factors[1]]], drop=FALSE), "dgTMatrix")))
+ as(fac2sparse(fr[[factors[1]]], drop.unused.levels=FALSE),
+ "dgTMatrix")))
names(ans) <- factors
ans
}
Modified: pkg/lme4.0/man/Dyestuff.Rd
===================================================================
--- pkg/lme4.0/man/Dyestuff.Rd 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/man/Dyestuff.Rd 2013-11-12 16:28:04 UTC (rev 1871)
@@ -53,6 +53,7 @@
%\references{}
\examples{
str(Dyestuff)
+require(lattice)
dotplot(reorder(Batch, Yield) ~ Yield, Dyestuff,
ylab = "Batch", jitter.y = TRUE, aspect = 0.3,
type = c("p", "a"))
Modified: pkg/lme4.0/man/Pastes.Rd
===================================================================
--- pkg/lme4.0/man/Pastes.Rd 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/man/Pastes.Rd 2013-11-12 16:28:04 UTC (rev 1871)
@@ -38,6 +38,7 @@
%\references{}
\examples{
str(Pastes)
+require(lattice)
dotplot(cask ~ strength | reorder(batch, strength), Pastes,
strip = FALSE, strip.left = TRUE, layout = c(1, 10),
ylab = "Cask within batch",
Modified: pkg/lme4.0/man/Penicillin.Rd
===================================================================
--- pkg/lme4.0/man/Penicillin.Rd 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/man/Penicillin.Rd 2013-11-12 16:28:04 UTC (rev 1871)
@@ -43,6 +43,7 @@
%\references{}
\examples{
str(Penicillin)
+require(lattice)
dotplot(reorder(plate, diameter) ~ diameter, Penicillin, groups = sample,
ylab = "Plate", xlab = "Diameter of growth inhibition zone (mm)",
type = c("p", "a"), auto.key = list(columns = 3, lines = TRUE,
Modified: pkg/lme4.0/man/VerbAgg.Rd
===================================================================
--- pkg/lme4.0/man/VerbAgg.Rd 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/man/VerbAgg.Rd 2013-11-12 16:28:04 UTC (rev 1871)
@@ -43,9 +43,8 @@
xtabs(~ btype + resp, VerbAgg)
round(100 * ftable(prop.table(xtabs(~ situ + mode + resp, VerbAgg), 1:2), 1))
person <- unique(subset(VerbAgg, select = c(id, Gender, Anger)))
-if (require(lattice)) {
- densityplot(~ Anger, person, groups = Gender, auto.key = list(columns = 2),
- xlab = "Trait Anger score (STAXI)")
+require(lattice)
+densityplot(~ Anger, person, groups = Gender, auto.key = list(columns = 2),
+ xlab = "Trait Anger score (STAXI)")
}
-}
\keyword{datasets}
Modified: pkg/lme4.0/man/ranef.Rd
===================================================================
--- pkg/lme4.0/man/ranef.Rd 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/man/ranef.Rd 2013-11-12 16:28:04 UTC (rev 1871)
@@ -70,8 +70,8 @@
fm3 <- lmer(diameter ~ (1|plate) + (1|sample), Penicillin)
ranef(fm1)
str(rr1 <- ranef(fm1, postVar = TRUE))
-dotplot(rr1,scales = list(x = list(relation = 'free')))[["Subject"]]
-##str(ranef(fm2, postVar = TRUE)) ## code not yet written
+lattice::dotplot(rr1,scales = list(x = list(relation = 'free')))[["Subject"]]
+try(ranef(fm2, postVar = TRUE)) ## Error: code not yet written
op <- options(digits = 4)
ranef(fm3, drop = TRUE)
options(op)
Modified: pkg/lme4.0/tests/lmer-1.Rout.save
===================================================================
--- pkg/lme4.0/tests/lmer-1.Rout.save 2013-11-09 17:10:11 UTC (rev 1870)
+++ pkg/lme4.0/tests/lmer-1.Rout.save 2013-11-12 16:28:04 UTC (rev 1871)
@@ -1,5 +1,5 @@
-R Under development (unstable) (2013-08-08 r63524) -- "Unsuffered Consequences"
+R version 3.0.2 Patched (2013-11-11 r64202) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
@@ -256,7 +256,7 @@
+ reg <- lmer(y ~ habitat + (1|habitat*lagoon), data = dat) # did seg.fault
+ ) # now gives error ^- should be ":"
Error in mer_finalize(ans) :
- Cholmod error 'invalid xtype' at file:../Cholesky/cholmod_solve.c, line 970
+ Cholmod error 'invalid xtype' at file:../Cholesky/cholmod_solve.c, line 1068
In addition: Warning message:
In Ops.factor(habitat, lagoon) : * not meaningful for factors
>
@@ -453,7 +453,7 @@
> ## discrepancies have occured at digit 140.64x;
> ## digits= doesn't handle it properly since other
> ## elements have smaller magnitudes
-> round(c(unlist(VarCorr(M2.))),2)
+> round(c(unlist(VarCorr(M2.))),2)
group1 group2 group3 group4
140.64 -1.42 -1.42 0.01
> options(op)
@@ -640,8 +640,8 @@
> if(.unsafe.BLAS) rm(identical)
>
> cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
-Time elapsed: 4.589 0.153 5.227 0 0
+Time elapsed: 6.273 0.17 6.672 0.004 0.004
>
> proc.time()
user system elapsed
- 4.589 0.153 5.227
+ 6.277 0.174 6.672
More information about the Lme4-commits
mailing list