complete.ts {autoTS}R Documentation

Creates additional dates and values when NA where removed and the TS is not complete

Description

Creates additional dates and values when NA where removed and the TS is not complete

Usage

complete.ts(dates, values, freq, complete = 0)

Arguments

dates

A vector of dates that can be parsed by lubridate

values

A vector of same size as dates

freq

A chacracter string that indicates the frequency of the time series ("week", "month", "quarter", "day").

complete

A numerical value (or NA) to fill the missing data points

Value

A dataframe with 2 columns : date and val, with additional rows

Examples

library(lubridate)
library(dplyr)
dates <- seq(as_date("2000-01-01"),as_date("2010-12-31"),"month")
values <- rnorm(length(dates))
complete.ts(dates,values,"month",complete = 0)

[Package autoTS version 0.9.11 Index]