Dear R-help, 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). 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 Apologies; here is my system information:> R.version_ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 4.1 year 2002 month 01 day 30 language R Thanks. R is great. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"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.frameLooks 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._