| crop_events {linbin} | R Documentation | 
Crop Events
Description
Crops events to the specified intervals. Events are cut at interval endpoints and any whole or partial events lying outside the intervals are removed.
Usage
crop_events(e, crops, scaled.cols = NULL)
Arguments
| e | An event table. | 
| crops | An event table specifying the intervals for cropping. Point intervals are allowed, and will create new point events where they intersect the interior, but not the endpoints, of line events. | 
| scaled.cols | Names or indices of the columns of the event table to be rescaled after cutting (see  | 
See Also
cut_events for only cutting events.
Examples
e <- events(c(0, 10, 20), c(10, 20, 30), x = 10)
crop_events(e, events(c(0, 15)))
crop_events(e, events(c(0, 5, 15)))
crop_events(e, events(c(0, 5, 15)), scaled.cols = "x")
crop_events(e, events(c(0, 5, 5, 15)), scaled.cols = "x")   # creates new points inside lines
crop_events(e, events(c(0, 10, 10, 15)), scaled.cols = "x") # but not at line event endpoints
[Package linbin version 0.1.3 Index]