0

I'm trying to create a map of board members for my nonprofit using ggmap. I'm located in San Diego so my code is as follows:

mapPoints <- qmap('San Diego, CA', zoom = 10) + 
             geom_point(data = membershipClean, 
                        aes(x = lon, y = lat, stat = "identity", size = Dues.Amount), 
                        alpha = .5)

Where lat and lon are the members' geocoded latitude and longitude respectively, and Dues.Amount is the numeric value by which I want the points scaled. When I run this code it throws the error:

Error: 'StatIdentity' is not an exported object from 'namespace:ggplot2'"

I can't find anyone else online who is having the same problem. I'm a new user of ggmap but I am following the tutorials I've found online pretty much line by line, so I'm kind of at a loss.

  • What is your version of `ggplot2` and how old are the tutorials you are following. Some changes have been introduced in the version `2.0.0` of `ggplot2`, possibly making the tutorials obsolete. –  Jan 28 '16 at 01:37
  • I have ggplot2 2.0.0, but now that you mention it the tutorials are fairly old. Do you have any idea how I could clean it up and make it work? – Grant Oliveira Jan 28 '16 at 01:48
  • Please provide some data (`membershipClean`) – erc Jan 29 '16 at 12:45

1 Answers1

2

I had the same problem. It is fixed in the dev version of ggmap. Install it using devtools:

library(devtools)
install_github('ggmap','dkahle')

Restart session, load packages, and it should work

Rolf Fredheim
  • 300
  • 3
  • 9