getDistPoint | R Documentation |
Calculate in-water distances from RSP locations to a point of reference
getDistPoint(input, point, t.layer, transmitter = NULL)
input |
The output of |
point |
Point of reference (lon, lat) to where distances will be calculated. |
t.layer |
A transition layer. Can be calculated using the function |
transmitter |
The animal(s) of interest for calculating distances. If not specified, by default, distances will be calculated for all animals in the dataset. |
The RSP detections object with a distance (in metres) column appended.
# Import river shapefile
water <- actel::shapeToRaster(shape = paste0(system.file(package = "RSP"), "/River_latlon.shp"),
size = 0.0001, buffer = 0.05)
# Create a transition layer with 8 directions
tl <- actel::transitionLayer(x = water, directions = 8)
# Import example output from actel::explore()
data(input.example)
# Run RSP analysis
rsp.data <- runRSP(input = input.example, t.layer = tl, coord.x = "Longitude", coord.y = "Latitude")
# Calculate distances to a point of reference
df.dist <- getDistPoint(input = rsp.data, point = c(151.0291, -33.81771), t.layer = tl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.