bursts.modify_conductance {scbursts} | R Documentation |
Transform the conductance states according to a user-defined function of conductance level.
Description
Transform the conductance states according to a user-defined function of conductance level.
Usage
bursts.modify_conductance(bursts, fun)
Arguments
bursts |
the list of segments |
fun |
a function on conductance levels |
Value
A modified copy of the original bursts
Examples
infile <- system.file("extdata", "example4.dwt", package = "scbursts")
dwells <- dwt.read(infile)
dwells_c <- risetime.correct_gaussian(Tr=35.0052278, dwells, units="us")
bursts <- bursts.defined_by_tcrit(dwells_c, 100, units="ms")
### Collapse into three subconductance states
fun <- function(amp) {
if (amp < 0.3)
return(0)
else if (amp >= 0.3 && amp < 0.6)
return(0.5)
else
return(1)
}
bursts_d <- bursts.modify_conductance(bursts, fun)
[Package scbursts version 1.6 Index]