getborders: Return borders of time chunks

Description Usage Arguments Value Examples

Description

Return the start and end time index of each chunk

Usage

1
getborders(df, max_gap = 600, min_len = 10, ind_time = F)

Arguments

df

a data frame with one column of "time" and of class POSIXct

max_gap

maximum time gap allowed to be counted as one chunk [s]

min_len

minimum length of a chunk

ind_time

a logical value, if TRUE, time index will be returned

Value

a data frame with two columns: - start: start time index of each chunk - end: end time index of each chunk

Examples

1
2
3
4
5
## Not run: 
 br1 <- getborders(df)
 br2 <- getborders(df, max_gap = 100, min_len = 0, ind_time = T)

## End(Not run)

sunsiyu/timelyr documentation built on May 30, 2019, 8:40 p.m.