sort.data.frame {mining} | R Documentation |
Re-orders data frame rows so that a column is sorted.
sort.data.frame(df,f=ncol(df))
df |
a data frame |
f |
the name or number of a column of df , or a numeric vector
to play the role of a column of df . |
A reordered version of df
where the values in column f
are in
ascending order.
Tom Minka
data(mtcars) sort.data.frame(mtcars,"mpg")