Well, having decided to get acquainted with some of the basic functions in R, I came across a function sort.list(). I get a pretty straightforward function sort(), but don't understand the idea sort.list(). I read that this should be a permutation function reordering the contents of my vector (in some way).
Having a vector
x <- c(5.0, 3.0, 2.0, 2.2, 0.0, 5.0, 3.0, 2.0, 2.2)
Execution of sort.list(x)exits
[1] 5 3 8 4 9 2 7 1 6
Where did it come from? Can someone give me a hint please? And what use is this permutation anyway?
Thank.
source
share