Description Usage Arguments Examples
Expands a data set so that it includes an observation for each time point in a sequence. Works with grouped data.
1 | TimeExpand(data, GroupVar, TimeVar, begin, end, by = 1)
|
data |
a data frame. |
GroupVar |
the variable in |
TimeVar |
the variable in |
begin |
numeric of length 1. Specifies beginning time point.
Only relevant if |
end |
numeric of length 1. Specifies ending time point.
Only relevant if |
by |
numeric or character string specifying the steps in the
|
1 2 3 4 | Data <- data.frame(country = c("Cambodia", "Camnodia", "Japan", "Japan"),
year = c(1990, 2001, 1994, 2012))
ExpandedData <- TimeExpand(Data, GroupVar = 'country', TimeVar = 'year')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.