split_ts: Split time series data at gaps

View source: R/data_prep.R

split_tsR Documentation

Split time series data at gaps

Description

Split time series data at gaps

Usage

split_ts(data, max_interval, min_ts_length = 0, units = "min", tz = NULL)

Arguments

data

Data frame with columns 'ID' and 'time', and any other data variables

max_interval

Longest permissible time interval within a time series, in minutes The time series will be split where there are gaps longer than max_interval.

min_ts_length

Minimum permissible length for a time series, in minutes. Time series shorter than this will be excluded from the output data frame. Defaults to 0, i.e., all time series are kept.

units

Time unit (default: "min")

tz

Time zone

Value

Data frame with same columns as input, plus a column 'ID_split' for the ID of the time series segments after splitting.


TheoMichelot/utilTM documentation built on April 14, 2025, 12:52 p.m.