how to sort a dataframe in r based on a column code example
Example 1: r sort data frame by one column
population[order(population$age),]
Example 2: sort dataframe r
df %>% arrange(column)
population[order(population$age),]
df %>% arrange(column)