[R] To overlay my raster and its boundary

Komine momadou at yahoo.fr
Wed Mar 21 21:49:12 CET 2012


Hi
I want to overlay my raster and its boundary which is a shapefile.
 When I used thise code separately, all is ok:
# Open raster 
>Image<-read.table("C:\\Users\\Documents\\Nouveau\\Frequence.txt",sep="",dec=",",header=TRUE)    
 >testo<-rasterFromXYZ(Image)   
>plot(testo) 
>testo2 <- aggregate(testo,fact=10, fun=mean) 
>plot(testo2) 
# open shapefiles= boundary 
>library (rgdal) 
>test1<-readOGR(dsn="C:\\Users\\Documents\\DISC D\\Nouveau",layer="pays") 
>plot(test1) 

But How to overlay both layers (raster and shapefile) to have a same map?.
Thank you in advance 

--
View this message in context: http://r.789695.n4.nabble.com/To-overlay-my-raster-and-its-boundary-tp4493705p4493705.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list