| as.spikeTrain {STAR} | R Documentation |
as.spikeTrain attempts to coerce a numeric vector to a
spikeTrain object while is.spikeTrain tests if its
argument is such an object. [.spikeTrain, extracts a subset of
a spikeTrain object.
as.spikeTrain(x) is.spikeTrain(x) ## S3 method for class 'spikeTrain': x[i]
x |
An object to be coerced to or to test against a
spikeTrain object or a spikeTrain object for [. |
i |
indices specifying elements to extract. No gaps are allowed. |
A spikeTrain object is a numeric vector whose elements
are strictly increasing (that is, something which can be interpreted
as a sequence of times of successive events with no two events
occurring at the same time). The extractor method, [ requires
that the extracted elements are without gaps, an error is returned otherwise.
as.spikeTrain returns a spikeTrain object or an error.
is.spikeTrain returns TRUE if its argument is a
spikeTrain object and FALSE otherwise.
[ returns a spikeTrain object or an error.
Christophe Pouzat christophe.pouzat@gmail.com
Perkel D. H., Gerstein, G. L. and Moore G. P. (1967) Neural Spike Trains and Stochastic Point Processes. I. The Single Spike Train. Biophys. J., 7: 391-418. http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&pubmedid=4292791
plot.spikeTrain,
print.spikeTrain,
summary.spikeTrain
## load CAL1S data data(CAL1S) ## convert the data into spikeTrain objects CAL1S <- lapply(CAL1S,as.spikeTrain) ## Are the list eleemnts now spikeTrain objects? sapply(CAL1S, is.spikeTrain) ## look at the train of the 1st neuron CAL1S[["neuron 1"]] ## look at the window 10-40 using the extractor function CAL1S[["neuron 1"]][10 < CAL1S[["neuron 1"]] & CAL1S[["neuron 1"]] < 40]