0

I am trying to create a side-by-side box plot. I have my data in a csv file in two columns "Location" and "Chlorothalonil" and used the following code:

systems <- read.table("~/Desktop/2015_Pre_Nurse_Chloro.csv", 
                       header=TRUE, sep=",", row.names=NULL)
boxplot(systems$Chlorothalonil ~ systems$Location, xlab="Site", 
        ylab="Chlorothalonil (ug/g)")

I keep getting the error

"Error in model.frame.default(formula = systems$Chlorothalonil ~ systems$Location) : invalid type (NULL) for variable 'systems$Chlorothalonil'

It seems like I need to specify the column titles somewhere...Any help?!

G5W
  • 36,531
  • 10
  • 47
  • 80
Jackie Albert
  • 33
  • 1
  • 3
  • Please include sample data https://stackoverflow.com/q/5963269/786542 – Tung Jan 10 '18 at 01:59
  • What's the result of `names(systems)`? Is 'Chlorothalonil' in there, spelled the same way with the same UppErCaSe letters? – Jason Jan 10 '18 at 01:59

0 Answers0