WrapMappingFunc: Wrap a mapping function to batch process abf channel data.

Description Usage Arguments Value

Description

The returned function accepts an abf object and maps its channel data in the given intv to the mapping function. If intv is not given, it maps the whole channel to mapping function instead. The return value type is depended on whether abf_id_func and epi_id_func are present. If so, a data.frame is returned, otherwise a matrix is returned. The column names are determined by chan_id_func, and if chan_id_func is missing, a column name of numeric channel id will be used.

Usage

1
2
3
4
5
WrapMappingFunc(map_func, channel, abf_id_func = NULL,
  epi_id_func = DefaultEpiLabel, chan_id_func = DefaultChanLabel,
  ret.df = TRUE, ...)

wrap(...)

Arguments

map_func

a mapping function to process abf channel data, such as mean, sum etc.

channel

OPTIONAL, a channel/channels to process.

abf_id_func

OPTIONAL, a function accepts an abf object and returns an identifier of the objects.

epi_id_func

OPTIONAL, a function accepts an abf object and returns a vector of identifiers of all episodes.

chan_id_func

OPTIONAL, a function accepts an abf object and returns a vectors of identifiers of all channels.

ret.df

wheter to return a data.frame, a matrix is returned instead if set to FALSE.

...

further arguments passed to map_func.

Value

a function of f(abf, intv).


Crystal-YWu/abftools documentation built on May 10, 2019, 8:22 a.m.