Description Usage Arguments Details Value Examples
This function takes either detections at stations or centers of activity (COAs) and creates a raster map showing number of detections in each cell.
1 | rasterize_dets(det_locs, r = init_raster(sta = det_locs))
|
det_locs |
A |
r |
A blank raster to use as the template for rasterizing the
locations. Defaults to a call to |
Calls the function raster::rasterize() to generate
the raster. Uses the function 'count'
Returns an object of class
RasterLayer with values equal
to the number of detections in each raster cell.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #Load example data
data(acoustic)
#Process detections
proc.det <- proc_dets(det = acoustic$detections, sta = acoustic$stations)
#Default rasterize
r1 <- rasterize_dets(det_locs = proc.det)
#Plot
plot(r1)
plot(acoustic$land, add = TRUE, col="wheat")
#Rasterize with a smaller grid
r2 <- rasterize_dets(det_locs = proc.det,
r = init_raster(sta = proc.det, res = 0.001))
#Plot
plot(r2)
plot(acoustic$land, add = TRUE, col="wheat")
#Rasterize COAs
coas <- coa_locs(proc.det)
r3 <- rasterize_dets(det_locs = coas,
r = init_raster(sta = proc.det, res = 0.001))
#Plot
plot(r3)
plot(acoustic$land, add = TRUE, col="wheat")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.