in my datatable, there are seven column(V1 to V7) and 100 rows. I would like to sort column V5 and V7 ascending and descending order respectively. I used the following code:
datatable1<- datatable [with(datatable, order (V5, -V7)), ]
But it is giving error message. If i do not put "-" sign before V7, both columns are arranged in ascending order. How can I arranged in ascending and descending order (V1 and V7 respectively)? Thanks.