Description Usage Arguments Value Examples
If one of the groups in a groupr
object is a date, then the object can
be manipulated into an xts
based groupr
object. This is done by
casting the date column against the unique values in the other grouping
columns. A value column must be chosen in order to "fill in" the returned
dataframe. The combination between the unique group values for the groups
which aren't dates can result in many columns per resultant dataframe, so
caution should be exercised when producing xts
based groupr
objects.
1 | extract_xts(groupr, value_choice, date_column = "dd_dt")
|
groupr |
Grouping object created with |
value_choice |
The column which will has values that will be in time
series. The function |
date_column |
The column with date data which will represent unique
index for the returned |
An xts_groupr
object with the date column cast against the
groups column, using sum
to summarize the value column
1 2 3 4 5 6 7 8 9 | permits_groupr <- groupr(
permits,
groups = c("issued_month", "existing_const_type")
)
permits_xts <- extract_xts(
permits_groupr,
value_choice = "count",
date_column = "issued_month"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.