| count.points.id {adehabitat} | R Documentation |
count.points counts the number of points in
each pixel of a raster map of class kasc or asc.
count.points.id counts the number of points in
each pixel of a raster map of class kasc or asc, for
different sets of points (e.g. the relocations of several animals
monitored using radio-tracking)
count.points(xy, w) count.points.id(xy, id, w)
xy |
a data frame with 2 columns containing the x and y coordinates of the points. |
id |
a factor giving, for each point, the membership of a point to a set. |
w |
an object of class asc, kasc or mapattr. |
count.points returns an object of class asc
containing the number of points in each cell of the raster
map.
count.points.id returns an object of class kasc,
with one column per level of the factor id,
containing the number of points numbered in each cell of the raster
map.
Clement Calenge calenge@biomserv.univ-lyon1.fr
kasc for additionnal information on objects
of class kasc, and storemapattr for further
information on objects of class mapattr.
data(puechabon)
kasc <- puechabon$kasc
locs <- puechabon$locs
## Counts the number of relocations of each wild boar
## per pixel of the raster map
(nlocrast <- count.points.id(locs[,4:5], locs[,1], kasc))
image(nlocrast)
## Counts the number of all relocations
## per pixel of the raster map
(nlocrast <- count.points(locs[,c("X","Y")], kasc))
image(nlocrast)