Description Usage Arguments Details Value
View source: R/unmerge_headers.R
Unmerge cells that represent hierarchical headers and row labels.
1 | unmerge_headers(sheet, xr, horizontal = TRUE, sep = ":")
|
sheet |
A |
xr |
A cell range (a |
horizontal |
Flag indicating if this a horizontal region
representing headers ( |
sep |
The separator to use between collapsed elements. The
default is a colon ( |
There is a pattern in headers where we have some number of levels of merge, most commonly:
1 2 | | -------X------- |
| a | b | c |
|
which typically is intended to be interpreted as:
1 | | X:a | X:b | X:c |
|
The same thing happen on rows, too. I suspect that this is generalisable to more than 2 columns.
Within such header rows are either: vertically merged:
1 2 | | X | ===> | X |
| | |
|
or stacked
1 2 | | X | ===> | X:a |
| a |
|
or stacked and blank
1 2 | | X | or | | ===> | X |
| | | X |
|
I want to write something that handles this, that can be hooked up to act as the "header" section on a view. For now, let's apply it to all cells within a range.
A character vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.