Unexpected symbol in my code

col = "blue"
xlab = "tradeshare"
ylab = "growth"
xlim = c(1, 5)
ylim = c(0, 40)

Hi Humzah and welcome.

Functions in R need commas between arguments. There are missing commas after where you define col, xlab, ylab, and xlim.

For reference, here's a nice general explanation for where this type of error can come from. r - Error: unexpected symbol/input/string constant/numeric constant/SPECIAL in my code - Stack Overflow

If you're just getting start with R, I'd encourage you to work through Hadley and Garrett's book R 4 Data Science. It is a friendly entryway into doing this kind of work with R.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.