View source: R/event_creation.R
| seq_events | R Documentation | 
Generates groups of regularly sequenced events fitted to the specified intervals. Intended for use as bins with sample_events.
seq_events(coverage, length.out = NULL, by = NULL, adaptive = FALSE)
coverage | 
 An event table specifying the non-overlapping intervals to which the event sequences will be fitted. Gaps in coverage do not count towards event length. Points in the coverage are currently ignored.  | 
length.out | 
 The number of events in each sequence. Event lengths are chosen such that they evenly divide the   | 
by | 
 The length of the events in each sequence. Ignored if   | 
adaptive | 
 If   | 
An endpoint-only event table with an additional group field if the length of length.out or by is > 1.
event_range, event_coverage, and fill_event_gaps for building a coverage from an existing event table.
e <- events(c(0, 20, 40), c(10, 30, 45))
no.gaps <- event_range(e)
has.gaps <- event_coverage(e)
seq_events(no.gaps, by = 10)                           # unequal length (last is shorter)
seq_events(no.gaps, by = 10, adaptive = TRUE)          # equal length (11.25)
seq_events(no.gaps, length.out = 4)                    # equal length (11.25)
seq_events(has.gaps, length.out = 4, adaptive = FALSE) # equal coverage (11.25), straddling gaps
seq_events(has.gaps, length.out = 4, adaptive = TRUE)  # unequal coverage, fitted to gaps
seq_events(no.gaps, length.out = c(2, 4))              # "group" column added
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.