Error: is.integer(group) is not TRUE while using ggmap in R

不羁的心 提交于 2019-12-12 12:27:28

问题


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



来源:https://stackoverflow.com/questions/40762729/error-is-integergroup-is-not-true-while-using-ggmap-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!