order function sorts the vector or sequence in ascending order code example
Example: descending order a list in r
x_sorted = sort(x, decreasing = FALSE, na.last = NA, ...)
x_sorted = sort(x, decreasing = FALSE, na.last = NA, ...)