[R-pkg-devel] NOTE regarding dependencies in R code: Missing or unexported object

Rune Haubo rune.haubo at gmail.com
Sat Apr 21 16:27:43 CEST 2018

I don't think 'summary' is actually exported by lmerTest (version >=  3.0-0):

fm <- lmer(Informed.liking ~ Gender + Information * Product + (1 | Consumer) +
             (1 | Consumer:Product), data=ham)
lmerTest::summary(fm) # gives: Error: 'summary' is not an exported
object from 'namespace:lmerTest'

On the other hand


works just fine. lmerTest defines the S3 method 'summary' for
'lmerModLmerTest' objects, so if you change  sx <-
lmerTest::summary(x)  to  sx <- summary(x) you should be fine assuming
that x is of class 'lmerModLmerTest'.

For more details see
and perhaps https://github.com/runehaubo/lmerTestR/blob/master/pkg_notes/new_lmerTest.pdf
(which you were also pointed to previously).

Best regards

On 20 April 2018 at 21:53, David Hervás via R-package-devel
<r-package-devel at r-project.org> wrote:
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> ---------- Forwarded message ----------
> From: "David Hervás" <ddhervas at yahoo.es>
> To: "r-package-devel at r-project.org" <r-package-devel at r-project.org>
> Cc:
> Bcc:
> Date: Fri, 20 Apr 2018 19:53:50 +0000 (UTC)
> Subject: NOTE regarding dependencies in R code: Missing or unexported object
> Hi,
> I have sent my package "clickR" to CRAN and was asked to fix the following NOTE:
> * checking dependencies in R code ... NOTE
> Missing or unexported object: 'lmerTest::summary'
> I'm not sure what's going on, here is the Imports section of my DESCRIPTION file:
> Imports: beeswarm, boot, lme4, lmerTest, methods, ReporteRs, xtable
> Here are the first lines of the function causing this NOTE:
> report.merModLmerTest<-function(x, file=NULL, type="word", digits=3, digitspvals=3,                                font=ifelse(Sys.info()["sysname"] == "Windows", "Arial",                                            "Helvetica")[[1]], pointsize=11, info=TRUE, ...){  sx <- lmerTest::summary(x)  cor <- as.data.frame(lme4::VarCorr(x))  ...
> And here is the output from getNamespaceExports("lmerTest") where "summary" is listed at position [23]
>  [1] "lmer"                   "lsmeansLT"              ".__T__is.infinite:base" [4] ".__T__as.integer:base"  ".__T__as.numeric:base"  ".__T__%*%:base"         [7] ".__T__dim:base"         ".__T__summary:base"     ".__T__$<-:base"        [10] ".__T__^:base"           ".__T__sum:base"         ".__T__rep:base"        [13] ".__T__*:base"           ".__T__[<-:base"         ".__T__as.logical:base" [16] ".__T__dimnames:base"    ".__T__%/%:base"         ".__T__prod:base"       [19] ".__T__[[<-:base"        ".__T__/:base"           "step"                  [22] "calcSatterth"           "summary"                ".__T__anova:stats"     [25] ".__T__is.finite:base"   ".__T__anyNA:base"       ".__T__!:base"          [28] ".__T__all:base"         ".__T__+:base"           ".__T__any:base"        [31] ".__T__dim<-:base"       ".__T__-:base"           ".__T__[:base"          [34] "anova"                  "difflsmeans"            "lsmeans"               [37] "rand"                   ".__C__merModLmerTest"   ".__T__length:base"     [40] ".__T__is.na:base"       ".__T__dimnames<-:base"  ".__T__&:base"          [43] ".__T__%%:base"          ".__T__$:base"

This seems to be from an older version of lmerTest.
> I have tried to reproduce this problem in my computer with different versions of R (3.4.4, 3.5 RC and R-devel) and only get the NOTE when performing the check with R-devel.

Have you checked that you are using a recent version of lmerTest with
3.4.4 and 3.5 RC? I think that might explain the diff.

> What should I do to fix this?
>         [[alternative HTML version deleted]]

More information about the R-package-devel mailing list