track_time: Track time duration

Description Usage Arguments Details Value Examples

View source: R/track_time.R

Description

Calculate time duration based on sequential difference of date-time input. The unit of time duration is seconds.

Usage

1

Arguments

date

date-time in POSIXct

Details

By convention the first value is set to NA missing value, because the difference applies to each sequential pair of locations.

To use this on multiple track ids, use a grouped data frame with tidyverse code like data %>% group_by(id) %>% mutate(duration = track_time(date))

Value

numeric vector of duration between sequential date-time values in seconds, see Details

Examples

1

traipse documentation built on Jan. 13, 2021, 7:11 a.m.