varOrder function

Order variables according to canonical structure or other criteria