Learn R Programming

IGM.MEA (version 0.3.4.1)

remove.spikes: remove.spikes

Description

removes all spikes and associated meta data from 's' spike object except those specified by 'ids'.

Usage

remove.spikes(s, ids)

Arguments

s
's' list object, needs to contain a 'spikes' field with spike train
ids
Name or index of channel(s) to be kept, all other channels removed. either name of channel, e.g. "E5_12" or an vector of idices c(1,2) corresponding to channel index. If a negative index is given, then that channel and associated data will be removed.

Value

's' object.

See Also

construct.s

Examples

Run this code
data("S") # load data
r<-remove.spikes(S, c(-1, -2))

S$channels[1:2] # original 's' object first 2 channels
r$channels[1:2] # first 2 channels have been removed

S$NCells # original count of channels
r$NCells # count of channels after 2 channels removed

S$nspikes # original spike count of first 2 channels
r$nspikes # spike count of first 2 channels after 2 channels removed

# OR keep only first 2 channels
t<-remove.spikes(S, c(1, 2))
t$channels

Run the code above in your browser using DataLab