This function transforms the k group labels to integers 1,...,k in a specified order.
1  createGroups(g, desOrder)

g 
Vector with group labels. 
desOrder 
Specified order for the groups. 
This function helps to renumber the group labels in a specified way.
The vector desOrder
gives the old numbers as the function of the new numbers.
The first element of desOrder
gives the old number that is transformed to be one, and so on.
The renumbering is used to specify alternative hypotheses.
The output is then a transformed vector g
with new group numbers.
For nonnumeric old group labels, the old number is the rank in the lexicographical order.
A vector containing the new group numbers.
Daniel Fischer
1 2 3 4 5 6 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.