remove.spikes: remove.spikes

Description Usage Arguments Value See Also Examples

View source: R/MEA_functions.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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

IGM.MEA documentation built on May 29, 2017, 11:07 p.m.