Home > Software engineering >  keeps appearing in RStudio Console and won't run previous code
keeps appearing in RStudio Console and won't run previous code

Time:10-20

I am trying to learn how to create maps with R. I'm just playing around with some code I see online but every time I run any line, the line that I ran shows up in my console, followed by a " " underneath it. What does this " " mean?

This is the code (from this site: https://www.molecularecologist.com/2012/09/18/making-maps-with-r/) :

library(maps)
library(mapdata)
map("worldHiresMapEnv","Canada”, xlim=c(-141,-53), ylim=c(40,85), col=gray90, fill=TRUE)

I've attached a photo that shows the " " I'm talking about, and also the error I get if I try to run the code again after getting the " "

I'm very new to R and trying to figure out how to navigate all the errors :)

CodePudding user response:

One of your " isn't a " recognized. The one at the end of Canada! Try this:

library(maps)
library(mapdata)
map("worldHiresMapEnv","Canada", xlim=c(-141,-53), ylim=c(40,85), col="gray90", fill=TRUE)
  • Related