convert to factor just returns the input if x is already a factor