Learn R Programming

tsibble (version 0.5.3)

append_row: Append rows to a tsibble

Description

Add new rows to the end of a tsibble by filling a key-index pair and NA for measured variables.

Usage

append_row(.data, n = 1L)

Arguments

.data

A tbl_ts.

n

An integer indicates the number of key-index pair to append.

Details

append_case() is an alias of append_row().

Examples

Run this code
# NOT RUN {
tsbl <- tsibble(
  date = rep(as.Date("2017-01-01") + 0:2, each = 2), 
  group = rep(letters[1:2], 3),
  value = rnorm(6),
  key = id(group)
)
append_row(tsbl)
append_row(tsbl, n = 2)
# }

Run the code above in your browser using DataLab