The answer is to use the function order. In my dataframe/matrix (data) with the three variables
time,drug,status, I want to sort by time whilst preserving rows. This is done by the command
data[order(data$time),]
Easy when you know how!
Regards, Paul Monaghan.
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news