Skip to contents

Apply summary function to each data point column in a SplicedView and return list of output data.

Usage

apply_column_spliceview(sv, FUN, simplify = FALSE, USE.NAMES = FALSE, ...)

sapply_column_spliceview(sv, FUN, simplify = TRUE, USE.NAMES = TRUE, ...)

Arguments

sv

SplicedView object.

FUN

function to apply.

simplify

see sapply().

USE.NAMES

see sapply().

...

passed to FUN.

Value

see sapply().

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)
mean_mat <- apply_column_spliceview(sv_duration_smile, mean, na.rm=TRUE)