Learn R Programming

intamap (version 1.3-21)

coarsenGrid: Coarsening of a spatial grid

Description

coarsenGrid is a function that resamples a SpatialGridDataFrame.

Usage

coarsenGrid(object,coarse=2,offset = sample(c(0:(coarse-1)),2,replace=TRUE))

Arguments

coarse
an integer telling how much the grid should be coarsened
offset
integer giving the relative offset of the first point, see details below for a closer description

Value

Details

The function coarsenGrid is a function that samples from a SpatialGridDataFrame. The argument coarse indicates that every coarse row and column will be sampled, starting with the row and column represented in offset. offset = c(0,0) implies that the smallest x- and y-coordinates will be a part of the resampled data set, offset = c(1,1) implies that sampling will start on the second row and column.

References

http://www.intamap.org/

Examples

Run this code
data(meuse.grid)
gridded(meuse.grid) = ~x+y
newMeuseGrid = coarsenGrid(meuse.grid,coarse=2,offset=c(1,1))

Run the code above in your browser using DataLab