STAR (version 0.3-7)

as.repeatedTrain: Coerce and Test repeatedTrain Objects

Description

as.repeatedTrain attempts to coerce a list with numeric vector elements to a repeatedTrain object while is.repeatedTrain tests if its argument is such an object.

Usage

as.repeatedTrain(x) is.repeatedTrain(x)

Arguments

x
An object to be coerced to or to test against a repeatedTrain object.

Value

as.repeatedTrain returns a repeatedTrain object or an error.is.repeatedTrain returns TRUE if its argument is a repeatedTrain object and FALSE otherwise.

Details

A repeatedTrain object is list of spikeTrain objects. It is used to store the responses of a given neuron to repeated stimulations.

See Also

plot.repeatedTrain, print.repeatedTrain, summary.repeatedTrain, psth, raster, as.spikeTrain, is.spikeTrain

Examples

Run this code
## load CAL1V data
data(CAL1V)
## convert them to repeatedTrain objects
CAL1V <- lapply(CAL1V, as.repeatedTrain)
## did the conversion work?
sapply(CAL1V, is.repeatedTrain)
## look at the raster of the 1st neuron
CAL1V[["neuron 1"]]

Run the code above in your browser using DataLab