character string to factor class in r