getCentroids | R Documentation |
When a timeslot dBBMM analysis is conducted, this function can be used to obtain centroid latitude and longitude locations between all utilization distribution contours at group or track level.
getCentroids(input, areas, type, level, group, UTM)
input |
The output of |
areas |
The output of |
type |
Character vector specifying the type of getAreas analysis performed: "group" or "track". |
level |
Numeric vector defining the contour level of dBBMM of interest to extract the centroid positions. |
group |
Character vector defining the group of interest for the analysis, when getAreas is of type "group". |
UTM |
Numeric vector representing the UTM zone of the study area. |
A dataframe containing the centroid positions per each timeslot
# 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")
# Run dynamic Brownian Bridge Movement Model (dBBMM) with timeslots:
dbbmm.data <- dynBBMM(input = rsp.data, base.raster = water, UTM = 56, timeframe = 2)
# Get dBBMM areas at group level
areas.group <- getAreas(dbbmm.data, type = "group", breaks = c(0.5, 0.95))
# Obtaing centroid coordinate locations of dBBMM:
df.centroid <- getCentroids(input = dbbmm.data, areas = areas.group, type = "group",
level = 0.95, group = "G1", UTM = 56)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.