Description Usage Arguments Value See Also Examples
View source: R/MEA_functions.R
removes all spikes and associated meta data from 's' spike object except those specified by 'ids'.
1 | remove.spikes(s, ids)
|
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. |
's' object.
construct.s
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.