| void | R Documentation |
void() replaces the visible text of the selected columns
with an empty string. The columns themselves (and their
headers) remain in the table, but the cell values are no
longer displayed.
This is useful when a column should stay in the layout
(e.g. to preserve its width or to keep its header label)
but its body values should be hidden, for instance
after using compose() to build a richer display in a
neighbouring column that already incorporates those values.
The underlying dataset is not modified; only the displayed
content is affected. To remove a column entirely, use
the col_keys argument of flextable() instead.
void(x, j = NULL, part = "body")
x |
a 'flextable' object, see flextable-package to learn how to create 'flextable' object. |
j |
column selector, see section Column selection with the |
part |
part selector, see section Part selection with the |
Other functions to compose cell content:
append_chunks(),
as_paragraph(),
compose(),
footnote(),
labelizor(),
prepend_chunks()
ftab <- flextable(head(mtcars))
ftab <- void(ftab, ~ vs + am + gear + carb)
ftab
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.