I couldn't find any reference to this in the FAQ, but is it possible to sort a dataframe by multiple columns?
I've created some code, similar to the following: nspr.code <- sp.results$sp.code[order( sp.results$sp.code )] nspr.tpa <- sp.results$tpa[order( sp.results$sp.code )] nspr.code <- as.character( levels( nspr.code ) )[nspr.code] nspr.tpa <- as.numeric( levels( nspr.tpa ) )[nspr.tpa] hope <- as.data.frame( cbind( nspr.code, as.numeric(nspr.tpa) ) ) and it seems to work, but I have dataframes that I would like to sort on using multiple columns (numeric and character). Something like : newframe <- sort( data=frame, list=c(plot,plant,sp) ) Or am I just barking up the wrong tree? Jeff. --- Jeff D. Hamann Forest Informatics, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 541-754-1428 [EMAIL PROTECTED] www.forestinformatics.com ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
