Hi I am a very new Rstudio user, trying to use R to complete an assignment per the instructions of my class but we were given virtually no class support and my teacher is non-responsive. We were given this code, however, when I run the summary, I do not receive the same data that the instructor does ( a second column of data that says A:14 above B:46). I have attached a photo of what I get. It seems like I have to define what to do with the data but I don't know how. Any help would be much appreciated. Thank you!
This is because in the versions equal or bigger than R 4.0.0, read.csv() and the others functions for import data don't coerce into factors the strings. Maybe your teacher made this exercise before these actualizations.
Thank you! This worked! I'm taking an online class that references a MUCH older version of R so I suspect you are right and am now incredibly nervous for the other 900 lines of code...
Thanks again!
As I can remember this is one of the latest most important changes in R base, maybe with some luck this could be the only type of problem that you could find. Good luck!
If you find that your teacher create a data frame with the data.frame() function, maybe you will have the same problem, you can solve this writing the argument stringsAsFactors = TRUE inside the function data.frame().
You're welcome! We are here to help us in what we can.