I encountered some strange behavior with the order() function. I run the following comment in the R.
> order(c(38,141,23,53,78,105))
The result is :
[1] 3 1 4 5 6 2
But I expected (if it is the descending):
5 1 6 4 3 2
(if it is the ascending)
2 6 1 3 4 5
What happen in this function? What's wrong with me? I'm afraid of understanding order() function.
Thanks!