1
$\begingroup$

This is a problem that I keep having when trying to do a boxplot in R. From what I can see the code I am using should work, not only that but when compared to my notes and other classmates it appears to be the same. What am I doing wrong?

result <- read.csv("keough.csv", header=TRUE, sep=";", dec= ",")
head(result)

 BIOFILM.SERP    
1        SL,61
2       SL,113
3       SL,123
4        SL,75
5        SL,75
6        SL,83

attach(result)
boxplot(BIOFILM~SERP, dat=result)

Error in eval(predvars, data, env) : object 'BIOFILM' not found

$\endgroup$
  • $\begingroup$ Looks like an import error. $\endgroup$ – Michael M Dec 1 '18 at 18:06
  • $\begingroup$ your import is wrong, try with sep=“, “ inside read.csv $\endgroup$ – paoloeusebi Dec 1 '18 at 21:54
  • $\begingroup$ On a side note: using attach/detach is not good practice, especially when working with multiple datasets. $\endgroup$ – bradS Jan 9 '19 at 12:39
0
$\begingroup$
result <- read.csv(“Keough.csv”, header=TRUE, sep=“,”, dec=“,”)
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.