[R] Sorting dataframe by different columns

Gunther Höning gunther.hoening at ukmainz.de
Fri Jun 8 08:58:53 CEST 2007


Dear list,

I have a very short question,
Suggest a dataframe of four columns.

df <- data.frame(w,x,y,z)

I want this ordered the following way:
first by :x, decreasing = FALSE
and 
secondly by: z, decreasing =TRUE

How can this be done ?

Thanks

Gunther



More information about the R-help mailing list