lowres: Reducing the Resolution of a Map

Description Usage Arguments Details Value Author(s) See Also Examples

Description

lowres is a generic function, having methods for the classes asc and kasc. It is used to reduce the resolution of the maps.

Usage

1
lowres(x, np = 2, ...)

Arguments

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

Details

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.

Value

Returns an object of class asc or kasc.

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

See Also

asc and kasc for further information on objects of class asc and kasc respectively.

Examples

1
2
3
4
5
6
7
8
9
data(puechabon)
kasc <- puechabon$kasc

## The initial image
image(kasc)

## The transformed image
m <- lowres(kasc, np = 4)
image(m)

adehabitat documentation built on Jan. 28, 2018, 5:02 p.m.