tsibble: Gap-filling on the temporal component of a cubble object

fill_gaps.temporal_cubble_dfR Documentation

Gap-filling on the temporal component of a cubble object

Description

Gap-filling on the temporal component of a cubble object

Usage

## S3 method for class 'temporal_cubble_df'
fill_gaps(.data, ..., .full = FALSE, .start = NULL, .end = NULL)

## S3 method for class 'temporal_cubble_df'
scan_gaps(.data, ...)

## S3 method for class 'temporal_cubble_df'
index_by(.data, ...)

Arguments

.data

A tsibble.

...

A set of name-value pairs. The values provided will only replace missing values that were marked as "implicit", and will leave previously existing NA untouched.

  • empty: filled with default NA.

  • filled by values or functions.

.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.

.start, .end

Set custom starting/ending time that allows to expand the existing time spans.

Value

a cubble object

Examples

library(tsibble)
climate_aus |> face_temporal() |> fill_gaps()
climate_aus |> face_temporal() |> scan_gaps()

cubble documentation built on Sept. 11, 2024, 7:19 p.m.