Question: what is the difference between character and factor in r?
Answer: The function character() is reserved for alphabetic characters (always categorical). The function factor() is reserved for alphanumeric (alphabetic and numeric) variables (always categorical). You can store everything as a factor or a character without loss of information.