Scan a tsibble for implicit missing observations

scan_gaps(.data, .full = FALSE)

Arguments

.data

A tsibble.

.full
  • FALSE inserts NA for each keyed unit within its own period.

  • TRUE fills NA over the entire time span of the data (a.k.a. fully balanced panel).

  • start() pad NA to the same starting point (i.e. min(<index>)) across units.

  • end() pad NA to the same ending point (i.e. max(<index>)) across units.

See also

Other implicit gaps handling: count_gaps(), fill_gaps(), has_gaps()

Examples

scan_gaps(pedestrian)
#> # A tsibble: 3,011 x 2 [1h] <Australia/Melbourne> #> # Key: Sensor [4] #> Sensor Date_Time #> <chr> <dttm> #> 1 Birrarung Marr 2015-04-05 02:00:00 #> 2 Birrarung Marr 2015-05-07 00:00:00 #> 3 Birrarung Marr 2015-05-07 01:00:00 #> 4 Birrarung Marr 2015-05-07 02:00:00 #> 5 Birrarung Marr 2015-05-07 03:00:00 #> 6 Birrarung Marr 2015-05-07 04:00:00 #> 7 Birrarung Marr 2015-05-07 05:00:00 #> 8 Birrarung Marr 2015-05-07 06:00:00 #> 9 Birrarung Marr 2015-05-07 07:00:00 #> 10 Birrarung Marr 2015-05-07 08:00:00 #> # … with 3,001 more rows