lowres is used to reduce the resolution of maps of class SpatialPixelsDataFrame.
lowres(x, np =2, which.fac=NULL,...)
Arguments
x: an object of class SpatialPixelsDataFrame
np: a number giving the number of pixels to merge together (see below)
which.fac: a vector containing the indices of the columns of x, which should be considered as a factor
...: further arguments passed to or from other methods
Details
The function merges together squares of np * np pixels. For variables of type "numeric", the function averages the value of the variable. For maps of type "factor", the function gives the most frequent level in the square of np * np pixels. When several levels are equally represented in the square of np * np
pixels, the function randomly samples one of these levels.
Returns
Returns an object of class SpatialPixelsDataFrame.