powered by
dfsort(x, which.col, levels)
base::factor
data(CO2) dfsort(CO2,"Treatment",c("nonchilled","chilled")) dfsort(CO2,3,c("chilled","nonchilled"))
Run the code above in your browser using DataLab