Unexpected symbol error in stats class homework

So my friend is in a stats class, and his professor keeps giving him faulty code.

He's supposed to type in:

plot(brainwt ~ headsize,
  data = brainhead[brainhead$gender == "male",],
  pch = 1,
  col = "blue",
  main = "Brain Weight versus Head Size by sex”,
  xlab = "head size (cm^3)",
  ylab = "brain weight (grams)"
  xlim = c(2700,5000)
  ylim = c(950,1700)

But he gets this error:

Error: unexpected symbol in:
" main = "Brain Weight versus Head Size by sex”,
xlab = "head"

We've tried messing around with placements of commas, quotations, so on, nothing fixes it. Any help?

The closing quote is curly, make it straight.

And though not too relevant here, but still you should be aware of this for future threads:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.