Thank you very much Oscar.

That works.

Manuel

2012/2/27 Oscar Perpiñán Lamigueiro <oscar.perpinan@upm.es>

> Manuel Spínola <mspinola10@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
>



-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola@una.ac.cr
mspinola10@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
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]]

