sort
- Sort function
x : | Real[] (pass by reference) |
The vector to be sorted. | |
ascending : | Bool (pass by value) |
Sort in ascending order?. | |
Default : TRUE |
nums = v(1,3,5,7,2,4,6,8)
sort(nums)
# this will result in 1,2,3,4,5,6,7,8
sort(nums, ascending = FALSE)
# this will result in 8,7,6,5,4,3,2,1