char2factor function

Convert character variable to a factor based off it's numeric variable counterpart.