I'm trying to use the indices of a sorted column of a dataset. I want to reorder the entire dataset by one sorted column.
Error in xj[i] : invalid subscript type 'list'
ix1 ix2 ix3 ix4 ix5 ix6 ix7 ix8 ix9 ix10 ix11 ix12 ix13
45 96 92 80 53 54 24 21 63 81 40 66 64
The call to sort with index.
return=TRUE returns a list with two components: x and ix. Indexing with  returns a subset of the list - still a list.
If you index using [] it should work better. That returns the element in the list. But indexing using $ix is perhaps a bit clearer.
But then again, if you only need the sorted indices, you should call
order instead of