Description Usage Arguments Examples
This functions passes grouping expressions to the .groupings argument of locate_groups. It works most naturally with fmt_* functions.
1 |
... |
mutate expression to group headers. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
# Read in tidyxl data frame
xl_df <-
locatr_example("worked-examples.xlsx") %>%
xlsx_cells_fmt(sheets = "pivot-hierarchy") %>%
append_fmt(fmt_alignment_indent)
# Add location annotations
xl_df <-
xl_df %>%
locate_data(data_type == "numeric") %>%
locate_groups(
direction = "W",
.groupings = groupings(fmt_alignment_indent),
.hook_if = hook_if(any(fmt_alignment_indent == 0))
) %>%
locate(direction = "N", name = student)
# Use `migrate` to reshape the data frame such that each data cells has its own row and
each header variable has its own column.
xl_df %>% migrate()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.