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