# Load data.table
library(data.table)
data.table::setDTthreads(1)
# Read example data
DT <- fread(system.file("extdata", "DT.csv", package = "spatsoc"))
# Cast the character column to POSIXct
DT[, datetime := as.POSIXct(datetime, tz = 'UTC')]
DT[, yr := year(datetime)]
# EPSG code for example data
utm <- 'EPSG:32736'
group_polys(DT, area = FALSE, hrType = 'mcp',
hrParams = list(percent = 95),
projection = utm, id = 'ID', coords = c('X', 'Y'),
splitBy = 'yr')
gbiMtrx <- get_gbi(DT = DT, group = 'group', id = 'ID')
Run the code above in your browser using DataLab