Description Usage Arguments Examples
Develop grouping categories for pivot tables
1 | prep_dimensions(x, ...)
|
x |
A pivot_prep object |
... |
A set of variable or named variables |
1 2 3 4 5 6 7 8 9 10 | sales_pivot <- retail_orders %>%
prep_dimensions(order_date = dim_hierarchy(
year = as.integer(format(orderdate, "%Y")),
month = as.integer(format(orderdate, "%m"))
)) %>%
prep_measures(no_orders = n(), total_orders = sum(sales))
sales_pivot %>%
pivot_columns(order_date) %>%
pivot_values(total_orders)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.