wormhole: Travel to a Specific Point in Time

Description Usage Arguments

View source: R/wormhole.R

Description

Opening a wormhole enables time travel to a specific point in time. By default, the history data frame is exposed to the global environment as it was available on that day.

Usage

1
2
3
4
5
6
7
wormhole(
  history,
  date = NULL,
  envir = globalenv(),
  verbose = TRUE,
  post_process = ts_attach
)

Arguments

history

a data frame with the publication history of the data. Must have column names pub_date, ref_date and value, plus a column that identifies multiple series. Use check_history() to check the validity of a history data.frame

date

"Date" or "character", the date where to a wormhole should be opened.

envir

environment where to expose the data.

verbose

logical, what objects will be exposed?

post_process

a function that is applied on DATA. By default, ts_attach adds makes series available as single ts objects. Alternatives are: ts_ts (to convert it to a multiple mts object), or any converter from tsbox.


christophsax/timemachine documentation built on Feb. 1, 2021, 2:05 p.m.