An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120224/b797e128/attachment.pl>
Problems with function gplot from rasterVis
3 messages · Manuel Spínola, Oscar Perpiñan
2 days later
Manuel Sp?nola <mspinola10 at gmail.com> writes:
library(raster)> library(rasterVis)> r = raster(jabali$map)> p = gplot(r) + geom_tile(aes(fill = value)) + geom_point(loc, aes(X,Y))Error: ggplot2 doesn't know how to deal with data of class uneval
I can plot the map, but I can get to plot the points on the map. The object "loc" is a data frame with the locations given by X and Y.
Hi Manuel, Try this: gplot(r) + geom_tile(aes(fill = value)) + geom_point(aes(X,Y), data=loc) The arguments of geom_point are mapping and then data, but you were using them in reverse order. Best, Oscar.
Oscar Perpi??n Lamigueiro Dpto. de Ingenier?a El?ctrica EUITI-UPM http://procomun.wordpress.com
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120227/2b6ea27a/attachment.pl>