as.repeatedTrain: Generic function to convert spikes to STAR as.repeatedTrain...

View source: R/spiketimes.R

as.repeatedTrainR Documentation

Generic function to convert spikes to STAR as.repeatedTrain objects

Description

The STAR (Spike Train Analysis with R) package has a large number of useful functions for e.g. PSTH analysis. Note that the spiketimes objects are a list of data frames, where each list element will correspond to one pxp file and will have trials for different odours. We now want to turn this into a list of repeatedTrain objects, one for each odour.

Usage

as.repeatedTrain(x, ...)

## S3 method for class 'spiketimes'
as.repeatedTrain(x, ...)

Arguments

x

Object containing spikes to convert

...

further arguments to be passed to or from other methods.

Value

repeatedTrain object (list of numeric vectors)

See Also

as.repeatedTrain

Examples

spikes<-CollectSpikesFromSweeps(
  system.file('igor','spikes','nm20110914c4',package='gphys'),
  subdir='BLOCKI',sweeps=0:4)
rt=as.repeatedTrain(spikes)
rt
require(STAR)
psth(rt[['PAA']])

jefferis/gphys documentation built on June 18, 2024, 4:35 a.m.