Learn R Programming

abf2 (version 0.7-1)

split.abf2: Split an abf2 trace on tag boundaries.

Description

Splits a data trace from an abf2 object (loaded by abfload into separate segments identified by the file tags.

Usage

"split"(x, f=NULL, drop=FALSE, adc = 1, lag = 0.3, ...)

Arguments

x
An abf2 object, loaded using abfload
f
Unused argument for compatibility with generic split.
drop
Unused argument for compatibility with generic split.
adc
Index of the ADC channel to split.
lag
An offset to be discarded after the start of a tag. It will typically take time for an experimental change denoted by a tag to take effect. In particular for voltage changes, there is a short delay between specifying the new voltage and it being applied by the amplifier. The default 0.3 second lag removes this delay period during which the previous value obtains. Longer values may be desirable when tags relate to slower interventions such as solution exchange.
...
Additional parameters (currently ignored).

Value

A list of objects of class abf2split, each including the following fields:
trace
A vector containing the actual sample data for split segment.
s
A vector containing the times of each of the samples in trace.
level
The prevailing voltage level, if known.
index
The index of this tag in the tags table (hence also this segment in the result list).
comment
The comment from the tag associated with this segment.

See Also

plot.abf2split, abfload

Examples

Run this code
## Not run: 
# # load an ABF file
# ab <- abfload()
# 
# # split the 2nd channel
# abx <- split(ab, adc=2)
# 
# # plot the first segment
# plot(abx[[1]])
# ## End(Not run)

Run the code above in your browser using DataLab