Question: what is the difference between factor and character 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.