I created the following groupedData object (nlme library):

gd <- groupedData(Conc ~ Time | Subj,
    order.groups=T,
    FUN = myf,
    data=mydata)

The idea of the myf function is to reverse the order of the grouping factor
Subj (or better, reorder from largest to smallest). In the mydata data set,
Subj is an integer that gets converted into a factor in the groupedData
object.
Does anyone knows how to write this function myf?

It may be even impossible to do it this way because the function is applied
on the dependent variable Conc (default in the package is mean), while I
need to apply my stuff on the factor Subj.

The lattice plot routines underneath the nlme library (like xyplot)
unfortunately start plotting the panels on the bottom of the page and up. In
order to have the order in a logical fashion (smallest to highest subj
number starting on top of the page and down), I need to reorder in the
groupedData object.


-- 
View this message in context: 
http://www.nabble.com/Reverse-order-of-grouping-factor-in-grouppedData-tf2817711.html#a7864653
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to