Use match() on a factor object

USAGE:

match.factor(x, table, nomatch) 

This is a method for the function match() for objects inheriting from class factor. See match or match.default for the general behavior of this function and for the interpretation of x, table, nomatch.