Description Usage Arguments Details Value Examples
Regularise a panel with non-existing rows or timesteps within the series. The
panel will be extend per group to the longest temporal coverage across groups
to make a balanced panel (at least in the group and time variables). The
series will be padded with NA
s.
1 | pan_regularise(x, g, t)
|
x |
A |
g |
An atomic character, name of the panel group variable in |
t |
An atomic character, name of the panel time variable in |
Currently supported are yearly, quaterly, and monthly data.
A data.frame
or data.table
depending on the input.
1 2 3 4 5 6 7 | x <- data.frame(
yr = rep(2000:2002, 2),
grp = rep(c("A", "B"), each = 3),
val = 1:6
)
x <- x[-2, ]
x_reg <- pan_regularise(x, "grp", "yr")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.