Learn R Programming

rMEA (version 1.2.2)

MEAmap: Apply a function to a single or a list of MEA objects

Description

MEApply is a wrapper to do.call that allows to apply a function on the motion energy data of one or multiple MEA objects. Complex constructions are possible, see details.

Usage

MEAmap(mea, FUN, label = "", ...)

Arguments

mea

an object of class MEA or a list of MEA objects (see function readMEA)

FUN

function to apply, found via match.fun.

label

a character vector to update the 'filter' attribute of mea.

...

further arguments passed to FUN. If a function is provided, it will be run on each MEA object and then passed as an argument to FUN.

Value

an object of the same class of the provided 'mea' object, with the transformed motion energy data

Details

FUN will be applied on the motion energy time-series of MEA objects, which is stored as a data frame with 2 columns, respectively for s1 and s2.