Description Format Source Examples
Example data for input to 'hwig'
A data.table with 14297 rows and 3 variables:
individual identifier
integer representing the year
# Load packages library(spatsoc) library(data.table)
# 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')]
# Temporal grouping group_times(DT, datetime = 'datetime', threshold = '20 minutes')
# Spatial grouping with timegroup group_pts( DT, threshold = 5, id = 'ID', coords = c('X', 'Y'), timegroup = 'timegroup' )
fwrite(DT[, .(id = ID, group, yr = year(datetime))], 'inst/extdata/DT.csv')
1 2 3 4 5 | # Load data.table
library(data.table)
# Read example data
DT <- fread(system.file("extdata", "DT.csv", package = "hwig"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.