Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

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

meaRtools

Micro-Electro Array (MEA) Analysis

v1.0.4
GPL (>= 3)
Authors
Quanli Wang [aut, ctb], Sahar Gelfman [aut, ctb, cre], Diana Hall [aut, ctb], Ryan Dhindsa [aut, ctb], Matt Halvorsen [aut, ctb], Ellese Cotterill [aut, ctb], Tom Edinburgh [aut, ctb], Stephen J. Eglen [aut, ctb, ths]
Initial release
2018-7-1

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.