Skip to contents

Apply complex function to each segment in a SpliceView object

Usage

apply_segment_spliceview(sv, FUN, ...)

Arguments

sv

SplicedView object.

FUN

function to apply.

...

passed to FUN.

Value

list of two elements: 'output' containing results of apply FUN to 'input'

Examples

r <- get_sample_recording()
d1 <- get_duration_annotation_data(r)
# only one relevant section for sample data
splicing_smile_df <- splice_time(d1, tier ='INTERACTION',
  comments = 'Mutual look and smile')

fv_list <- get_filtered_views(r, data_points = "Nose", n = 41, p = 3)
jv <- get_joined_view(fv_list)
sv_duration_smile <- get_spliced_view(jv, splicing_df = splicing_smile_df)
wavelet_smile_list <- apply_segment_spliceview(sv_duration_smile, analyze_wavelet,
  column = "Nose_x_Central_Sitar")
#> Starting wavelet transformation...
#> ... and simulations... 
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
#> Class attributes are accessible through following names:
#> series loess.span dt dj Wave Phase Ampl Power Power.avg Power.pval Power.avg.pval Ridge Period Scale nc nr coi.1 coi.2 axis.1 axis.2 date.format date.tz 
names(wavelet_smile_list)
#> [1] "output" "input"