dot-convertId function

Convert a factor/char to an id