Does ggmap work with sf objects through geom_sf?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Does ggmap work with sf objects through geom_sf?

Manuel Spínola
Dear list members,

Does ggmap work with sf objects through geom_sf?

I got the following error:

nc <- st_read(system.file("shape/nc.shp", package="sf"))

nclocation <- c(-80, 34)

ncmap <- get_map(location = nclocation, zoom = 6)

ggmap(ncmap) + geom_sf(data = nc)

Error in eval(expr, envir, enclos) : object 'lon' not found


--
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
[hidden email] <[hidden email]>
[hidden email]
Teléfono: (506) 8706 - 4662
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Loading...