Skip to content
Prev 1949 / 29559 Next

[Moved from R-help] Re: [R] confine a dataframe with a polygon

On Wed, 4 Apr 2007, temiz wrote:

            
In R-GRASS, use system("g.region ...") to set the subregion before 
readRAST6().

For interpolation, you have two data sets, the point data for which you 
know z, and the newdata points, often a raster, to which you want to 
interpolate. I guess that you want to define the prediction model based on 
all the data, then predict for tiles of newdata locations for export with 
writeRAST6(). They can be put together in GRASS with system("r.patch 
..."), or a more detailed process taking care of possible overlaps.
Use system("g.region ...") to choose a small enough region.

If your observed data are also large volume (a big DEM, for example), you 
will need to be careful how you do things, possibly either using the GDAL 
GRASS plugin and rgdal, or r.out.gdal for say geotiff, and then subset the 
amount of data read in in readGDAL. Users report success with very large 
data sets and rgdal, you just need to do things in sensible subsets.