Convert annotation data.frame to a long format sequence where the length of the time window bins is defined by cut (in seconds)
convertor_long_cut(data, onset, offset, cut = 0.1)
data | : a data.frame annotation |
---|---|
onset | : time of the data where the conversion should start |
offset | : time of the data where the conversion should stop |
cut | : length of the bins in millisecond |
A data.frame in a long format version of the classic raw annotation file
if (FALSE) { library(ChildRecordsR) path = "/mnt/94707AA4707A8CAC/CNRS/corpus/vandam-daylong-demo" CR = ChildRecordings(path) raw_file <- file.opener(CR$all.meta[1,],CR, use_data_table = TRUE, threads = parallel::detectCores()) long_file <- convertor_long_cut(raw_file, onset = 1, offset = 100000, cut = 1) head(long_file) colSums(long_file) }