ReturnVR2Distance: Extract the Distances Moved Between VR2 Receiver Units Within...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function uses combines the non-residence event table with a distance matrix to extract the minimum distance moved between two receivers. This function returns a numeric vector containing the minimum distance moved between receivers (extracted from sDistanceMatrix). This function is not mandatory as it is carried out automatically if the user provides a distance matrix in the sDistanceMatrix field when running the RunResidenceExtraction function.

Usage

1
ReturnVR2Distance(NonResidenceFile, sDistanceMatrix)

Arguments

NonResidenceFile

a data frame containing the nonresidences event table

sDistanceMatrix

a two dimentional array (matrix) containing the pairwise distances between an array of VR2 receivers

Value

a numeric vector of minimum distance travelled (in kilometers) corresponding to the values listed in the distance matrix

Author(s)

Ross Dwyer, Mathew Watts, Hamish Campbell

See Also

RunResidenceExtraction, NonResidenceExtractId

Examples

 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
30
31
32
33
34
35
36
37
38
39
40
## Not run: 
# Extract residence events at RECEIVERS from the VTrack transformed 
#   crocodile dataset

# Load the crocodile dataset into the VTrack archive format
data(crocs)  
Vcrocs <- ReadInputData(infile=crocs,
                        iHoursToAdd=10,
                        fAATAMS=FALSE,
                        fVemcoDualSensor=FALSE,
                        dateformat = NULL,
                        sVemcoFormat='1.0')        

# Extract data for only the transmitter #138
T138 <- ExtractData(Vcrocs, 
                    sQueryTransmitterList = 138)

# Extract residence and non residence events
#   Minimum number of detections to register as a residence
#   event = 2  
#   Min time period between detections before residence event
#   recorded = 43200 secs (12 hours)
T139Res <- RunResidenceExtraction(sInputFile=T138, 
                                 sLocation="RECEIVERID",
                                 iResidenceThreshold=2,
                                 iTimeThreshold=43200,
                                 sDistanceMatrix=NULL)

# The nonresidences event table
T139nonresid <- T139Res$nonresidences

# Generate the Direct Distance Matrix
data(PointsDirect_crocs)
DirectDM <- GenerateDirectDistance(PointsDirect_crocs)

# Run the VR2 distances function
(My_distances <- ReturnVR2Distance(NonResidenceFile = T139nonresid,
                                   sDistanceMatrix = DirectDM))

## End(Not run) 

VTrack documentation built on May 2, 2019, 9:16 a.m.