Problem with registering google API key for ggmap2.

I am new to R and am having trouble with registering my google API key, any help would be greatly appreciated. Thank you! (Note: the key used below "dfsdfasfdgds-dgsdgadgdgaweg" is fake, used for an example.)

> register_google(key = dfsdfasfdgds-dgsdgadgdgaweg)
Error in Sys.setenv(GGMAP_GOOGLE_API_KEY = key) : 
  object 'dfsdfasfdgds-dgsdgadgdgaweg' not found

I am not familiar with this function but, at the least, the key needs to be in quotes.

register_google(key = "dfsdfasfdgds-dgsdgadgdgaweg")
1 Like

That was it! I am a bit embarrassed it was that simple especially since I've been fooling with it for the past two hours. Thank you!

This topic was automatically closed 7 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.