3
votes

I am trying to plot some GPS locations on a map. I used "ggmap" library for this. While using ggmap command, I get below error-

ggmap(mp)

Error: is.integer(group) is not TRUE

Here is code snippet:

library(ggplot2)
library(ggmap)

mapgilbert = get_map(location = (Long=mean(as.numeric(datn$Long)),Lat=mean(as.numeric(datn$Lat))), zoom = 4,maptype = "satellite", scale = 2)

ggmap(mapgilbert)

Note : "datn" is data frame containing GPS locations in columns Lat and Long.

I tried using locations like "paris","texas" etc as given in R help (

map <- get_map(location = "texas", zoom = 6, source = "stamen")

ggmap(map, fullpage = TRUE))

but it didn't help. Still getting same error after ggmap command.

1
I upgraded ggplot2,ggmap and plyr. It solved the problem - user7199416

1 Answers

3
votes

I upgraded ggplot2,ggmap and plyr. It solved the problem