[R-sig-ME] possible side effect of gdata library on dotplot of random terms

Douglas Bates bates at stat.wisc.edu
Tue Dec 8 14:59:45 CET 2009


My suggestion would be not to use gdata. :-)

More seriously, as I understand it you are saying that gdata provides
a method for reorder that is not upwardly compatible with the method
in the stats package.  If so, I would regard this as a flaw in the
design of the gdata package.   One should not willfully change the
behavior of functions in required packages.

Having said that, I am a bit confused by your saying that dotplot
seems to be using the method from the stats package but it does not
provide the desired reordering when gdata is attached in the search
path before stats.  The first part (continuing to use the method from
stats) is what I would expect to happen.  This is exactly what
namespaces are for - to seal the set of functions and methods that are
seen inside the lme4 package.  What I don't understand is why the plot
does not then work as before.

Could you provide us with a reproducible example and the output of
sessionInfo() please?

On Tue, Dec 8, 2009 at 3:43 AM, espesser <robert.espesser at lpl-aix.fr> wrote:
> Dear all
>
> It seems there is a name conflict between the reorder.factor() function
> from the package "gdata" and the reorder.factor() from the package "stats" .
> After loading the  library "gdata", dotplot(ranef( model_object.lmer)  )
> - which seems using internally  by default reorder.factor()  from the
> package "stats"  -
> does not plot the random terms sorted any more .
> The regular behavior can be recovered with:
> detach("package:gdata",unload=T)
> but is there an easier or a more convenient way ?
>
> Thank you for your help
>
> R. Espesser
> CNRS - Université de Provence
> Laboratoire Parole & Langage
> 5 avenue Pasteur
> BP 80975
> 13604 Aix en Provence Cedex 1 (France)
>
> web : www.lpl-aix.fr/~espesser
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>




More information about the R-sig-mixed-models mailing list