[R] Rows function in nlme package

Paul Murrell p.murrell at auckland.ac.nz
Wed Oct 24 00:11:32 CEST 2001


> > The Rows function which is called from plot.compareFits in the nlme
> > is not found.
> >
> > > plot(compareFits(coef(bp.model3),coef(bp.model3M)))
> > Error in plot.compareFits(compareFits(coef(bp.model3),
coef(bp.model3M))) :
> > couldn't find function "Rows"
> > >
> >
> > Can I find it elswhere? Have I missed a required package?
> >
> [...]
> After further hunting I realise  this is probably part of the "Trellis"
> package that is seem being brewed.

It does appear that Rows() is part of Trellis in S-Plus (given that the
example for rows is a Trellis-related example), which means that you have
probably correctly guessed why it is not in R (because it is not in the
lattice package which we are "brewing").

OTOH, Rows() does not seem like a very hard function to replicate.  It would
appear that ...

    Rows(x, index)

... is basically just doing ...

    lapply(x, "[", index)

... so you could fix the code yourself if you feel keen.  In the longer
term, a fix will need changes to either nlme or lattice, at least one of
which will hopefully occur by the end of the year.


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