I am trying to plot some graphs and run some ANOVA on data I imported from a csv file. I have opened the file a text editor to double check if everything look alright, and it does:
[1]: https://i.stack.imgur.com/wghHg.png
Once loaded into R, I have the header set to true, and column 1 set to characters, column 2 to numeric (I have tried integer as well). If I type the name of the import (data2) into the console, it displays my data correctly. However, once I try to do a boxplot or run any type of test on it, I get a message saying object 'any of the two obejects*'not found
.
I have also tried saving the CSV file as TXT and load it as a CSV, to no avail. Regardless if I use the read.table or read.csv commands or import the file via the GUI Import button, R does not accept the objects.
Here is a piece of the code, albeit there is virtually none:
boxplot(Treatment2~WBSF2)
Error in eval(predvars, data, env) : object 'Treatment2' not found
I also tried:
> boxplot(Treatment2 ~ WBSF2, data=df)
Error in as.data.frame.default(data, optional = TRUE) :
cannot coerce class ""function"" to a data.frame