Learn R Programming

tsgc (version 0.0)

reinitialise_dataframe: Reinitialise a data frame by subtracting the reinit.date row from all columns

Description

Reinitialise a data frame by subtracting the reinit.date row from all columns

Usage

reinitialise_dataframe(dt, reinit.date)

Value

The reinitialised data frame

Arguments

dt

Cumulated data series.

reinit.date

Reinitialisation date. E.g. '2021-05-12'.

Examples

Run this code
library(tsgc)
data(gauteng,package="tsgc")
reinitialise_dataframe(gauteng,as.Date("2021-01-01"))

Run the code above in your browser using DataLab