lowres {adehabitat} | R Documentation |
lowres
is a generic function, having methods for the classes
asc
and kasc
. It is used to reduce the resolution of
the maps.
lowres(x, np = 2, ...)
x |
an object of class asc or kasc |
np |
a number giving the number of pixels to merge together (see below) |
... |
further arguments passed to or from other methods |
The function merges together squares of np * np
pixels. For
maps of type "numeric"
(see
help(asc)
), 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 an object of class asc
or kasc
.
Clement Calenge clement.calenge@oncfs.gouv.fr
asc
and kasc
for further
information on objects of class asc
and kasc
respectively.
data(puechabon) kasc <- puechabon$kasc ## The initial image image(kasc) ## The transformed image m <- lowres(kasc, np = 4) image(m)