Description Usage Arguments Details Value See Also Examples
The function creates a two dimensional density matrix which defines the distribution of an animal population inside a region.
1 | generate.density(reg, nint.x = 100, nint.y = 100, southwest = 1, southeast = 1, northwest = 1)
|
reg |
a region onto which the density is mapped |
nint.x |
number of x-intervals in the density matrix. |
nint.y |
number of y-intervals in the density matrix. |
southwest |
density value at the south-western corner of the region. |
southeast |
density value at the south-eastern corner of the region. |
northwest |
density value at the north-western corner of the region. |
This function places a ‘nint.x’ by ‘nint.y’ grid over the survey region; using linear interpolation and the three density values at ‘southwest’, ‘southeast’ and ‘northwest’, it calculates relative densities at other grid points in the region. The resulting density matrix defines a relative density plane. Note that the density surface is relative; it is proportional to the density of animal groups but absolute density depends on the number of groups in the region (which is set using setpars.population
). Higher resolution grids are created by increasing ‘nint.x’ and/or ‘nint.y’. Stips or blocks of constant density can be added using the function set.stripe
; bell-shaped density "bumps" or "dips" can be added using add.hotspot
.
An object of class 'density.population´ which has the following elements:
n.interval.x |
number of x-intervals |
n.interval.y |
number of y-intervals |
matrix |
the density matrix. |
generate.region
summary.density.population
plot.density.population
add.hotspot
set.stripe
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | reg <- generate.region(x.length = 50, y.width = 80)
dens <- generate.density(reg)
# image plot:
plot(dens, method = "image")
# 3-D wireframe plot:
plot(dens, eye.horiz=330, eye.vert=35)
# generate another density matrix with ascending density
reg <- generate.region(x.length = 50, y.width = 80)
dens <- generate.density(reg, nint.x = 50, nint.y = 40, southwest = 1, southeast = 10, northwest = 20)
# image plot:
plot(dens, method = "image")
# 3-D wireframe plot:
plot(dens, eye.horiz=330, eye.vert=35)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.