Skip to contents

Works by adding a random offset to each start time in the splice. Uses rejection sampling to avoid overlaps with the input segments and additional segments from a list of splices.

Usage

sample_offset_splice(splicing_dfr, v, num_splices, rejection_list = list())

Arguments

splicing_dfr

Splice object.

v

View object.

num_splices

number of random splices to generate.

rejection_list

list of Splice objects for rejection.

Value

list of splicing data.frames.

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_offset_splice(splicing_df[1,], rv1, num_splices = 100)
#> Accepted splices: 95
#> Accepted splices: 193