I have recently encountered issues with the ggmap functions - had never had any.
I have this data.frame:
> head(df)
longitude latitude freq
1 -118.7093 34.13446 2
2 -118.7092 34.13437 1
3 -118.6851 34.28574 5
4 -118.5986 34.26155 1
5 -118.5917 34.22762 6
6 -118.5914 34.37675 1
I used to be able to get a map using get_map then plot the plots the raster object using ggmap. I would then use + geom_point or whichever to plot my data, worked like a charm.
map <- get_map(location=c(lon=-117.962813,lat=33.969399), zoom=10, maptype="hybrid")
finalmap <- ggmap(map, base_layer = ggplot(aes(x=longitude, y=latitude), data = df))
However now ggmap returns:
Error in annotate("rect", xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, :
unused arguments (xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, fill = darken[2], alpha = as.numeric(darken[1]))
As anyone else encountered this?