I have 2 .asc files and I want to do a intersection of these 2. Then save
the resultant raster file to a .asc file again. Code I wrote is as follows.

   r2 = raster("t1.asc")
   r1 = raster("t2.asc")
   i1 = intersect(r2,r1)
   i1name = "new.asc"
   writeRaster(i1, i1name )

The question I have is how to specify a nodata value as -9999 in the
resultant raster. Right now the nodata value is -2147483647  or -3.4e+38.
Due to this nodata value my .asc files are huge and I am having trouble
using in later analysis. Any help is appreciated.

Thanks in anticipation.

Narayani

	[[alternative HTML version deleted]]

