Reputation: 9348
Below simple lines before start to use 'ggmap'
install.packages("devtools")
devtools::install_github("dkahle/ggmap")
library(devtools)
library(dplyr)
library(purrr)
library(ggmap)
library(gmapsdistance)
api_key = Sys.getenv("A_GOOGLE_API_KEY")
register_google(key = api_key)
set.api.key(api_key)
has_goog_key()
It returns:
Error in has_goog_key() : could not find function "has_goog_key"
What went wrong, and how can I check if the given Goole API key is valid?
Upvotes: 0
Views: 375
Reputation: 448
has_goog_key
is a function in a different ggmap package
, which you can find via devtools::install_github("fresques/ggmap")
. In the package you're using, the equivalent function would be has_google_key
.
Upvotes: 1