Re: [R] Problem with lme4 use and installation

From: Douglas Bates <bates_at_stat.wisc.edu>
Date: Mon, 03 Mar 2008 12:30:46 -0600

On Mon, Mar 3, 2008 at 9:57 AM, Charilaos Skiadas <cskiadas_at_gmail.com> wrote:
> Nothing's wrong. It just means that the package or one of its
> dependencies, has its own xtabs function, which "hides" the default
> xtabs function, since it comes first in the search path. So when you
> next write xtabs(...), it is this new xtabs that is being loaded. If
> you want to call the original xtabs, you can still do it I think with
> stats::xtabs(...).
>
> This is a warning, not an error. It warns you that something you
> perhaps did not expect has just happened.

Exactly.

The warning actually comes from loading the Matrix package, a package is required by the lme4 package. Martin Maechler and I define an extended xtabs function as an S4 generic in the Matrix package. This version allows an optional argument "sparse". When sparse = TRUE the new version produces a cross-tabulation in the form of a sparse matrix. As you might expect, this is particularly useful for sparse cross-tabulations.

When sparse = FALSE, the default value, this version reverts to the xtabs function from the stats package. Thus the substitution should be benign except that it will make xtabs run infinitesimally slower because it requires an extra level of dispatch. Unless you are making thousands of calls to xtabs you shouldn't notice this.

> On Mar 3, 2008, at 10:33 AM, Andreas Nord wrote:
>
> >
> > Dear all,
> >
> > I've been trying to install the lme4 package from
> > http://r-forge.r-project.org/projects/lme4/. However, when wanting
> > to load
> > the package, I get an message saying that "x-tabs" are masked (see
> > pasted
> > code). Can anyone point to what has gone wrong?
> >
> > Kind regards,
> > Andreas Nord
> > Sweden
> >
> >> utils:::menuInstallLocal()
> > package 'lme4' successfully unpacked and MD5 sums checked
> > updating HTML package descriptions
> >> library(lme4)
> > Loading required package: Matrix
> > Loading required package: lattice
> >
> > Attaching package: 'Matrix'
> >
> >
> > The following object(s) are masked from package:stats :
> >
> > xtabs
> >
> >>
> > --
> > View this message in context: http://www.nabble.com/Problem-with-
> > lme4-use-and-installation-tp15806404p15806404.html
> > Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 03 Mar 2008 - 18:45:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 03 Mar 2008 - 19:30:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive