sample_offset_splice function

Randomly create matching segments from a splicing table without overlaps

Randomly create matching segments from a splicing table without overlaps

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.

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.

Returns

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)

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_gap_splice(), summary_onsets(), visualise_sample_splices()

  • Maintainer: Tuomas Eerola
  • License: MIT + file LICENSE
  • Last published: 2023-06-09

Useful links