wks.reorder(2,5) //moves 2nd column to be the 5th column
wks.reorder(2, 0) //moves 2nd column to be the last column
wks.reorder(2,-1) //moves 2nd column to be next-to-last column
wks.reorder(0, -1) //moves the last column to be next-to-last column
wks.reorder(-1, 1) //moves next-to-last column to be the first column
//to swap 2nd column and 4th, use
dataset vv = {1,4,3,2};
wks.reorder(vv);