sample_gap_splice {movementsync} | R Documentation |
Randomly create matching segments from a splicing table without overlaps
Description
Works by randomly varying the gaps between segments assuming that the gap number follow a Poisson process with rate given by the average sample gap length in the input splice. Durations of segments remain the same.
Usage
sample_gap_splice(splicing_dfr, v, num_splices, rejection_list = list())
Arguments
splicing_dfr |
|
v |
|
num_splices |
number of random splices to generate. |
rejection_list |
list of |
Details
Uses rejection sampling to avoid overlaps with the input segments and additional segments from a list of splices.
Value
list of splicing data.frames.
See Also
Other statistical and analysis functions:
apply_column_spliceview()
,
apply_segment_spliceview()
,
ave_cross_power_over_splices()
,
ave_cross_power_spliceview()
,
ave_power_over_splices()
,
ave_power_spliceview()
,
calculate_ave_cross_power1()
,
calculate_ave_power1()
,
compare_ave_cross_power1()
,
compare_ave_power1()
,
compare_avg_cross_power2()
,
compare_avg_power2()
,
difference_onsets()
,
pull_segment_spliceview()
,
sample_offset_splice()
,
summary_onsets()
,
visualise_sample_splices()
Examples
r1 <- get_sample_recording()
d1 <- get_duration_annotation_data(r1)
rv1 <- get_raw_view(r1, "Central", "", "Sitar")
splicing_df <- splice_time(d1, tier ='INTERACTION', comments = 'Mutual look and smile')
# Only first segment relevant for sample data
x <- sample_gap_splice(splicing_df[1,], rv1, num_splices = 10)