Description Usage Arguments Author(s) Examples
fDrawfigure extracts either a random point or a probability weighted random point falling within a specified home range. The random point, the observed locations, the specified ud vertice or the utilisation distribution can be plotted on a user-defined background.
1 | fDrawfigure(x, iextract, idataxy = NULL, istudy = NULL)
|
x |
a numeric vector representing the individual to be plotted. This number relates to order in which animals are listed within the iextract object |
iextract |
either a SpatialPolygonsDataFrame object containing the vertice of interest or a SpatialGridDataFrame object containing the utilisation distribution of interest |
idataxy |
an optional dataframe containing the animal locations |
istudy |
optional background layer for the points to be plotted. This can be a spatial polygon object, a raster or blank = NULL |
Ross Dwyer ross.dwyer@uq.edu.au
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 | ## Load required packages
library(adehabitatHR)
## Load study data
data(StudyArea)
data(Roos)
# Subset the data for only 1 individual
RooSubid <- 'Stripes'
RooSub <- subset(Roos,Roos$ID==RooSubid)
RooSub$ID <- as.character(RooSub$ID)
coordinates(RooSub) <- ~x+y
## Estimation of UD and KUD 95% for 1 animal
ud <- kernelUD(RooSub,h="href",same4all=TRUE)
ver95 <- getverticeshr(ud,95,unin = c("m"),unout=c("ha"))
udsgdf <- as(estUDm2spixdf(ud),"SpatialGridDataFrame")
## Extract random points falling within animal #1's KUD 95%
fDrawfigure(1,ver95,RooSub,StudyArea)
## Extract probability-weighted random points falling within
## animal #1's UD and draw on map of the study area.
fDrawfigure(1,udsgdf,RooSub,StudyArea)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.