Function: ordering
By tholscla on Sat, 11/02/2013 - 19:27
This function will sort a dataframe by the column number specified.
First cbind() your variables together and then sort by one column.
ordering=function(dataset, col.num)
{ index=order(dataset[,col.num])
hold=0
dataset=dataset[index,]
dataset
}
### Example:
# turtles=cbind(w,f,y)
# ordering(turtles, 3)