as.repeatedTrain: Coerce and Test repeatedTrain Objects

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/repeatedTrain.R

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

1
2

Arguments

x

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

Details

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

Value

as.repeatedTrain returns a repeatedTrain object or an error.

is.repeatedTrain returns TRUE if its argument is a repeatedTrain object and FALSE otherwise.

Author(s)

Christophe Pouzat christophe.pouzat@gmail.com

See Also

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

Examples

1
2
3
4
5
6
7
8
## 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"]]

Example output

Loading required package: survival
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-28. For overview type 'help("mgcv-package")'.
Loading required package: R2HTML
Loading required package: gss
Loading required package: codetools
neuron 1 neuron 2 neuron 3 neuron 4 
    TRUE     TRUE     TRUE     TRUE 

STAR documentation built on May 2, 2019, 4:53 p.m.