Closed Mckenziematt closed 5 years ago
Hey @Mckenziematt this is just a guess but I think what happened is that we set HomelessClean$ConcernForSafety
to integers as the code above suggested. Then you accidentally reran that same line of code. That would cause that variable to become all NA's. When in doubt I always suggest a fresh import of the data.
Thanks for your help
HomelessClean$ConcernForSafety <- as.numeric(factor(HomelessClean$ConcernForSafety, levels = c('Never', 'Rarely', 'Sometimes', 'Always')))
I got help recoding my variable in class. It worked when Mcglinn ran it. But when I loaded R again it listed all my data for "ConcernForSafety" as NA instead of in numeric form in the HomelessClean data set
I was wondering if R is assigning things in alphabetical order and if that may be the reason