time series

data.table - Generate and fill missing values.

Hi, in this post I illustrate how we can generate NA (missing values) rows using only data.table functions, where you have a date column (or equivalent) in your data. We begin by loading the package. library(data.table) ## Warning: Paket 'data.table' wurde unter R Version 3.6.3 erstellt Problem Let us assume you have a data.table with three columns date, value and product. Here date is of type IDate, value & product are integer.