I extracted tweets from twitter using searchtwitter function and created a csv file containing the columns "longitude" and "latitude" and I created a variable "tweets" to read the csv file. Each tweet/row has longitude and latitude data. I want to plot the location of the tweets onto the google map of Singapore.
How do I plot the points on the google map that I created using PlotOnStaticMap function? This is the code to achieve my google map:
sgmap<-GetMap(center="Singapore",zoom=11)
PlotOnStaticMap(sgmap)
points(tweets$longitude,tweets$latitude,col="red",cex=.6)
I've also tried this code:
sgmap<-GetMap(center="Singapore",zoom=11)
PlotOnStaticMap(sgmap,cex=.6,col="red",FUN=points,add=F)
points(tweets$longitude,tweets$latitude,col="red",cex=.6)
and:
sgmap<-GetMap(center=c(1.352083,103.8198),zoom=11,destfile="map.png",maptype="satellite")
PlotOnStaticMap(lat=tweets$latitude,lon=tweets$longitude,zoom=11,cex=.6,col="red",FUN=points)

PlotOnStaticMap(sgmap, lat=tweets$latitude, lon=tweets$longitude, col="red",cex=.6)- user3710546