bursts.space_out {scbursts}R Documentation

Artificially add amount of time between bursts (in absence of recording information).

Description

Given a list of segments separated by an unknown amount of time, one may want to space the segments by some amount of time, so that they can be plotted. This function takes a separating factor, and splits up the segments by either that factor (in seconds), or that many multiples of the largest observed dwell.

Usage

bursts.space_out(segments, sep_factor = 1000)

Arguments

segments

The segments to space out

sep_factor

the factor by which to separate the segments. Either the factor in seconds, or a multiple of the longest observed dwell.

Value

The segments again, but with modified meta-data.

Examples

infile <- system.file("extdata", "example_multiple_segments.dwt", package = "scbursts")
dwells <- dwt.read(infile)

# Still a list, but the meta-data is fixed
spaced_records <- bursts.space_out(dwells, sep_factor=1000)

# Combine them, and they'll be nicely spaced out.
single_record <- bursts.recombine(spaced_records)

# You can now plot that single_record using one of the plot functions.


[Package scbursts version 1.6 Index]