Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registering API key only works when package is loaded #244

Closed
lorenzwalthert opened this issue Oct 31, 2018 · 1 comment
Closed

Registering API key only works when package is loaded #244

lorenzwalthert opened this issue Oct 31, 2018 · 1 comment

Comments

@lorenzwalthert
Copy link

@lorenzwalthert lorenzwalthert commented Oct 31, 2018

ggmap::register_google(key = "my-key-here")
ggmap::get_map()
#> Error in if (has_google_client() && has_google_signature()) { : 
  missing value where TRUE/FALSE needed

My problem is that I'd like to use the key in another (internal) package and I don't want people to enter the key all the time, so I must put a library call into it into .onload().

  library(ggmap)
  register_google(key = "my-key-here")

But I don't want ggplot and ggmap loaded automatically.

@dkahle
Copy link
Owner

@dkahle dkahle commented Feb 13, 2019

Hi @lorenzwalthert - sorry to take so long to address this. This should be fixed with this dev commit (0c68d5c). At very least, your code now works. Using ggmap::register_google() is probably not really needed anymore, though, as you probably have your key in .Renviron. In any case, I'll close for now; let me know if I need to reopen. Thanks!

@dkahle dkahle closed this as completed Feb 13, 2019
dkahle added a commit that referenced this issue Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants