lowres {adehabitat} | R Documentation

## Reducing the Resolution of a Map

### 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

    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(as.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)

Clément Calenge calenge@biomserv.univ-lyon1.fr

### See Also

`as.asc`, `as.kasc`

### Examples

    data(puechabon)
    kasc <- puechabon$kasc

    ## The initial image
    image(kasc)

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

[Package adehabitat version 1.4 Index]