convertor_long_cut: Converts annotation format to long format

Description Usage Arguments Value Examples

View source: R/convertor_long_cut.R

Description

Convert annotation data.frame to a long format sequence where the length of the time window bins is defined by cut (in seconds)

Usage

1

Arguments

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

Value

A data.frame in a long format version of the classic raw annotation file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

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)

## End(Not run)

LAAC-LSCP/ChildRecordsR documentation built on July 26, 2021, 3:25 p.m.