Answers for "dataframe r order by column"

2

reorder dataframe cols r

col_order <- c("Species", "Petal.Width", "Sepal.Length",
               "Sepal.Width", "Petal.Length")
my_data2 <- my_data[, col_order]
Posted by: Guest on July-08-2020
2

r sort data frame by one column

population[order(population$age),]
Posted by: Guest on August-19-2020

Code answers related to "dataframe r order by column"

Browse Popular Code Answers by Language