| ascgen {adehabitatMA} | R Documentation |
Making Raster Maps From SpatialPoints Objects
Description
ascgen creates an object of class SpatialPixelsDataFrame
using a set of points contained in an object of class
SpatialPointsDataFrame.
Usage
ascgen(xy, cellsize = NULL, nrcol = NULL, count = TRUE)
Arguments
xy |
an object inheriting the class |
cellsize |
the cell size (resolution) of the object of class
|
nrcol |
the size of the square raster map to be created (number of rows/columns) |
count |
logical. If |
Value
Returns an object of class SpatialPixelsDataFrame.
Author(s)
Clement Calenge clement.calenge@ofb.gouv.fr
See Also
SpatialPixelsDataFrame-class for additional
information on objects of class SpatialPixelsDataFrame and
SpatialPoints-class for additional information on
objects of class SpatialPoints.
Examples
## generates a random sample of points
xy <- matrix(runif(1000), ncol=2)
## coerce them to SpatialPoints
xy <- SpatialPoints(xy)
plot(xy)
## generate a SpatialPixelsDataFrame
## (and count the number of points)
spd <- ascgen(xy, cellsize=0.1)
image(spd)
[Package adehabitatMA version 0.3.16 Index]