Home Forums Analytics / Predictive Analytics Character Variables to Factor Variables

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4819
    crushknight8
    Participant

      Hi There,

      I was reviewing the June 16 2020 Exam, I noticed there were a lot of variables that are character variables but in the solution they do not change them to factor variables. I was having trouble running the solution code because the variables had to be converted to factor variables. Why is this not done in the solution, and is there something I am missing that allows character vars to be ran like factor vars?

      #4833
      SmilingGhost
      Participant

        It might just be because of the version of R you are running. Try using the command options(stringsAsFactors = TRUE) at the start of the file.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.