[R] nlme package dependencies?

Douglas Bates bates at stat.wisc.edu
Wed Feb 13 15:40:53 CET 2002


"Cooke, Barry" <BCooke at exchange.cfl.forestry.ca> writes:

> The following nlme example, from help(Variogram.gls), does not work on my
> system.  
> 
> > data(BodyWeight)
> > fm1 <- gls(weight ~ Time * Diet, BodyWeight)
> > Variogram(fm1, form = ~ Time | Rat)[1:10,]
> Error in FUN(X[[1]], ...) : unused argument(s) (method ...)
> 
> It looks like I might not have loaded a necessary package.  I did load nls
> and lattice (the latter not actually being listed in the package description
> as a dependency).  

Lattice was not listed as a dependency for nlme because both lattice
and grid were classed as "in development" until R-1.4.1.  In
R-1.4.1 nlme is a recommended package but lattice and grid are not.
Having nlme depend on lattice would contradict this classification.

I hope we will change lattice and grid to be recommended packages in
R-1.5.0 and then we can list a dependency of nlme on lattice.

> I checked the R-help archives thoroughly and also
> examined the library nlme scripts.  The chapter 5 Wheat2 example from
> Pinheiro & Bates (2000) didn't work either:
> 
> > library( nlme )
> > library( lattice )
> > data( Wheat2 )
> > fm1Wheat2 <- gls( yield ~ variety - 1, Wheat2 )
> > Variogram( fm1Wheat2, form = ~ latitude + longitude )
> Error in as.data.frame.default(x[[i]], optional = TRUE) : 
>         can't coerce array into a data.frame

Looks like an error in nlme.  Usually these are the result of code
written originally for S-PLUS being incompletely ported by me to R.
I'll look into it.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list