Closed cregouby closed 3 years ago
Brief description of the problem *_gaps are a very usefull set of commands. And I would love to use them on longitudinal data with start and stop index columns, like tsibbledata::nyc_bikes.
*_gaps
start
stop
tsibbledata::nyc_bikes
What output is expected
This is a manual edit :
scan_gaps(nyc_bikes) %>% head(3) # A tsibble: 4,258 x 12 [0.0149047991726547µs] <America/New_York> # Key: bike_id [10] bike_id start_time stop_time <fct> <dttm> <dttm> 1 26301 2018-02-26 19:15:40 2018-02-27 07:52:49 2 26301 2018-02-27 07:58:13 2018-02-27 12:03:27 3 26301 2018-02-27 12:04:54 2018-02-27 13:53:51 ...
Reproductible example
# insert reprex here library(tsibble) scan_gaps(tsibbledata::nyc_bikes)
I've opened a ticket on {tsibbledata} https://github.com/tidyverts/tsibbledata/issues/16 nyc_bikes should be a tsibble of irregular interval, and therefore *_gaps() do not work with irregular tsibble.
nyc_bikes
*_gaps()
Brief description of the problem
*_gaps
are a very usefull set of commands. And I would love to use them on longitudinal data withstart
andstop
index columns, liketsibbledata::nyc_bikes
.What output is expected
This is a manual edit :
Reproductible example