Dear Thiago,
You can use polygonsToRaster(     , mask=TRUE)  ('raster' package).
Robert

On Wed, Jun 23, 2010 at 6:29 AM, Thiago Veloso <thi_veloso@yahoo.com.br>wrote:

>   Dear r-siggers,
>
>   Does anybody know how to clip, or cut a map using a previous loaded
> shapefile? To produce the attached map, I'm using the following code:
>
> image(lon,lat,testedec1[111:133,15:43],col=rainbow(10))
> par(new=T)
> plot(brazil)
>
>   Where "brazil" is a shapefile loaded with maptools library. Is it
> possible to use this shape as a mask to filter the map values? The result
> would be only the values which are inside the contour...
>
>   Thanks in advance,
>
>   Thiago Veloso.
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>

	[[alternative HTML version deleted]]

