runOnSessionList-methods: Running a function on a set of recording sessions

Description Usage Arguments Value

Description

This applies a function to a list of RecSession objects. If save is set to TRUE, the results returned by the function will be saved. The function applied to single recording sessions should return the results in a list. The results are saved in the resultsDirectory of the ElectroProject object. The names of the files saved will be the name of the elements in the list returned by the function If the element is an array or matrix, they will be bound with abind. If not a array or matrix, the data from each recording session will be bound togheter using rbind. You can use snow::parLapply instead of lapply by setting parallel to TRUE and passing a valid cluster to the function If save is set to FALSE, the data returned by the lapply function will not be saved but retured. If overwrite is set to TRUE, previous data will be overwrite when saving the data. If overwrite is set to FALSE, the new data will be appended to the old one.

Usage

1
2
3
4
5
6
7
runOnSessionList(ep, sessionList, fnct = function(x) {     NA }, save = T,
  overwrite = T, parallel = F, cluster = "", ...)

## S4 method for signature 'ElectroProject'
runOnSessionList(ep, sessionList,
  fnct = function(x) {     NA }, save = T, overwrite = T, parallel = F,
  cluster = "", ...)

Arguments

ep

ElectroProject object

sessionList

List of RecSession objects on which the function will be applied

fnct

A function to run on each RecSession

save

Whether you want to save the data returned by the function

overwrite

Logical indicating if the data returned by the function will overwrite the old one when saving into a file

parallel

Whether you want to run the function in parallel

cluster

A cluster generated from the makeCluster function of the snow package

...

optional arguments to fnct

Value

list of list returned by the lapply function


kevin-allen/relectro documentation built on May 20, 2019, 9:06 a.m.