returnStateEvents {stopdetection}R Documentation

Return State Events

Description

Given a data.table updated with stop and move events from stopFinder, returns data aggregated to the event level.

Usage

returnStateEvents(dt)

Arguments

dt

data.table updated with stop and move events from stopFinder

Value

data.table with one line per stop/move event, annotated with columns state_id, state, begin_time, end_time and n_locations. Move events contain information on the raw_travel_dist and a move_id. Stop events have values for columns meanlat and meanlon, which are respectively the mean latitude and longitude of locations occurring during the stop.

Examples

library(data.table)
data(loc_data_2019); setDT(loc_data_2019)
stopFinder(loc_data_2019, thetaD = 200, thetaT = 300)
returnStateEvents(loc_data_2019)

[Package stopdetection version 0.1.2 Index]