interval_join.Rd
Given one dataset where each row represents an interval at coarser scale (for example, one row per dive with dive start/end times), pull in summary information about finer-time-scale data. For example, add the max RL during each dive, or the median MSA during each dive.
interval_join(
x,
y,
start_x,
start_y,
end_x = start_x,
end_y,
suffix = c("", ".new"),
...,
keep = FALSE
)
interval data frame or tibble (data with one row per dive, dive-cycle, day, etc.) Should have columns that provide start and end times of each interval; these can be date-times or any numeric time indicator
data frame at finer time-scale with information to summarize and pull into x
name of variable with interval start times in x
name of variable in y
that contains sample times or event-start times
name of variable in x
that contains interval end times (defaults to start_x
if not given)
name of variable in y
that contains event or sample end times (defaults to start_y
if not given)
(Passed to left_join
; most users can ignore) If there are non-joined duplicate variables in x and y, these suffixes will be added to the output to disambiguate them. Should be a character vector of length 2.
Additional arguments to pass to left_join
(Passed to left_join
; most users can ignore and keep the default value, FALSE) Should the join keys from both x and y be preserved in the output?
A data.frame like the input interval dataset x
, but with additional columns for the new summarized variables
# Examples will go here