I have a matrix with two columns of the following form:
1 349 1 393 1 392 4 459 3 49 3 32 2 94
I would like to sort this matrix in increasi
The accepted answer works like a charm unless you're applying it to a vector. Since a vector is non-recursive, you'll get an error like this
$ operator is invalid for atomic vectors
You can use [ in that case
[
foo[order(foo["V1"]),]