This question already has answers here:
How to sort a dataframe by multiple column(s)
(19 answers)
Closed 2 years ago.
I'm curious why the arrange function won't will work for alphabetical order but not reverse alphabetical order.
df <- data.frame(string = as.character(c("b", "a", "c")), stringsAsFactors = F)
df %>% arrange(string) #works
df %>% arrange(-string) #does not work
Am I just using the completely wrong method for what I'm trying to accomplish?