continuity
is based on the 'islands & gaps' concept.
Use case for continuity
is to roll up a sequence consisting of smaller duration into a larger epoch governed by some meaningful separation between \(n_\text{lower}\) and \({n - 1}_\text{upper}\) segments.
continuity(
data,
map_fields,
time_fields,
timeout = 0,
boundary_name = "window",
archipelago = TRUE,
show.all = FALSE
)
(object): The source dataset, including all non-sessioning fields desired
(string): A vector of strings or symbols indicating the field names that will partition data
(string): A vector of strings or symbols indicating the field names to use as "start" and "stop" temporal indices. If only one value is given, that value will be repeated as the "stop" index
The largest allowable 'gap' in a series of time values before a new 'island' begins: can be a quoted expression that conditionally determines the value.
If using date or datetime values for time_fields
, specify the timeout using an appropriate lubridate
functions (e.g., days
).
(string): The name root of the boundary column names (e.g., "episode" => "episode_start_idx", "episode_end_idx")
(logical | TRUE): Should the output include the islands and gaps generated?
(logical | FALSE): Should the output include all of the columns of the output? show.all
and archipelago
are independent
A data.table
with the following columns <mapFields>, <X>, <Y>
:
archipelago = TRUE
){boundary_name}_start_idx, {boundary_name}_end_idx, ISLAND, GAP
show.all = TRUE
)island_idx, seq_idx, start_idx, stop_idx, rec_idx, map_partition, delta_start, delta_stop