Description Usage Arguments Value Examples
Order a list of bursts by some function. For instance, popen.
1 | bursts.sort(bursts, func, reverse = FALSE)
|
bursts |
The list of all bursts |
func |
A function of a segment that returns a numeric value |
reverse |
By default, return in ascending order. Use reverse=TRUE to change that. |
A list sorted by func. By default in ascending order (unless reversed)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | infile <- system.file("extdata", "example1_qub.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")
# A sorted list of bursts.
sorted <- bursts.sort(bursts, segment.popen)
# You can also write your own functions. If you want P(Open) =~ P(Closed)
variance_fun <- function (seg) {
# Any function that maps a segment to a number works.
return( segment.popen(seg) * segment.pclosed(seg) )
}
weird_sort <- bursts.sort(bursts, variance_fun)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.