file.opener: Opening a data file in ChildRecordingsData class

Description Usage Arguments Value Examples

View source: R/file_opener.R

Description

Open a csv file from a ChildRecordingsData class. The function provides transformation of data such as creating a true segment_onset and segment_offset based on meta data. It will also provide POSIXct time info if start_time of the recording is provided in the meta

Usage

1
file.opener(meta_row, ChildRecordings, use_data_table = FALSE, threads = 1)

Arguments

meta_row

: a row from the meta containing all the info of the cvs file

ChildRecordings

: a ChildRecordingsData class

use_data_table

: use the data.table package to read the .csv annotation data (depending on the operating system and the number of threads used it can be 3 to 5 times faster than 'read.csv')

threads

the number of threads to run in parallel

Value

A data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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())
head(raw_file)


## End(Not run)

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