fRanXY: Extract random points from within an individual's home range

Description Usage Arguments Author(s) Examples

View source: R/fRanXY.R

Description

Extracts either either a random point from a home range vertice (i.e. a SpatialPolygonsDataFrame object) or a probability-weighted random point from a Utilisation Distribution (i.e. a SpatialGridDataFrame object)

Usage

1
fRanXY(x, iextract)

Arguments

x

a numeric vector representing the individuals of interest. 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

Author(s)

Ross Dwyer ross.dwyer@uq.edu.au

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Load required packages
library(adehabitatHR)
library(raster)

## Load study data
data(StudyArea)
data(Roos)

coordinates(Roos) <- ~x+y

## Estimation of UD and KUD 95% for the 10 animals
ud <- kernelUD(Roos,h="href",same4all=TRUE)
ver95 <- getverticeshr(ud,95,unin = c("m"),unout=c("ha"))

## Conversion from a adehabitat UDm object into a sgdf object
udsgdf <- as(estUDm2spixdf(ud),"SpatialGridDataFrame")

## For 3 animals, extract a random point falling within their respective KUD 95%
fRanXY(1:3,ver95)

## For 3 animals, extract a probability weighted random point falling within 
## their respective utilisation distributions
fRanXY(1:3,udsgdf)

Digiroo2 documentation built on May 1, 2019, 9:50 p.m.