Description Usage Arguments Value Author(s) See Also Examples
Often we are interested in a core area which is smaller than the full extent of the habitat. This function enables you to define a core area and add the corresponding raster to the JAGSmask
object.
1 2 |
JAGSmask |
The object of class |
type |
The basis for the core area: |
buffer |
If |
poly |
Bounding polygon for the core area; only used if type is |
cell.overlap |
The criterion for including a pixel in the raster: |
plot |
If TRUE, the resulting mask and trap locations will be plotted (not yet implemented). |
The original JAGSmask
object supplied as input, with an additional component coreMat
, a 1/0 matrix where coreMat[x, y] = 1
if location (x, y) is in the core.
Note that the core only includes good habitat: pixels for which habMat[x,y] == 0
will also be 0 in coreMat
.
Mike Meredith
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(simSCR)
JAGSmask <- simSCR$JAGSmask
plot(JAGSmask)
# Part of the study area is in Arkadia municipality and we want the population
# inside Arkadia, so we use Arkadia as the "core":
Arkadiamask <- addCore(JAGSmask, type="poly", poly=simSCR$Arkadia)
plot(Arkadiamask) # core area yellow, remainder of habitat white
# How many animals in the core area?
# Get a posterior distribution for number of ACs in the state:
Ncore <- getACinCore(simSCR$sims.list$S, simSCR$sims.list$w, Arkadiamask)
plot(table(Ncore))
mean(Ncore) # posterior mean
quantile(Ncore, probs=c(0.025, 0.975)) # 95% credible interval
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.