ascgen {adehabitat} | R Documentation

## Creation of Raster Maps

### Description

`ascgen` creates an object of class `asc` using a set of points.

### Usage

    ascgen(xy = NULL, cellsize = NULL, nrcol = 10, count = TRUE)

### Arguments

`xy` | a data frame with two columns: the x and y coordinates of the points
`cellsize` | the `cellsize` attribute of the object of class `asc` to be created
`nrcol` | the size of the square raster map to be created (number of rows and columns)
`count` | logical. If `TRUE`, the object of class `asc` contains the number of points in each cell. If `FALSE`, all the cells are set to zero

### Value

Returns an object of class `asc`.

### Author(s)

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

### See Also

`import.asc` for additional information on objects of class `asc`.

### Examples

    data(puechabon)
    lo <- puechabon$locs[,c("X","Y")]
    plot(lo, asp = 1, pch = 16)

    ## lo contains the relocations of wild boars
    rast <- ascgen(lo, cellsize = 100)
    image(rast)

    ## Alternatively, one can specify the size of the square raster map
    rast <- ascgen(lo, nrcol = 10)
    rast
    image(rast)

    ## can be used for further analyses
    ## (e.g. correspondence analyses)
    locs <- puechabon$locs[, c("Name", "X", "Y")]
    o <- count.points.id(locs[,2:3], locs[,1], rast)
    image(o)

[Package adehabitat version 1.4 Index]