I am trying to produce tables in which some cells contain unordered lists. I am trying to output to docx.
I tried the regular qmd tables, and flextable, and now I am in Huxtable.
The reason I chose to stick with Huxtable is because it provides better formatting options for my needs.
The one thing I am stuck on, which produces the error at the end of this post, is when I try to do bulleted lists inside a cell. Even when trying to use markdown, its failing to produce bulleted lists.
I tried different methods over the week and honestly I don’t know what to do.
The code bit that is causing the issue: information[2, 1] <- "- test 1 n - test 2 n - test 3"
If anyone can kindly suggest other workarounds for in-cell bullets, or a solution, I would be really grateful.
Code to produce the error:
---
format:
docx: default
---
<!-- Information -->
```{r}
#| echo: false
#| warning: false
#| message: false
library(huxtable)
library(officer)
library(systemfonts)
information <- hux(
columnone = c("", ""),
add_colnames = FALSE
)
information[1, 1] <- "test"
information[2, 1] <- "- test 1 n - test 2 n - test 3"
set_markdown(information)
```
And this error happens:
processing file: test.qmd
1/2
2/2 [unnamed-chunk-1]
Error in dplyr::bind_rows(.) :
Argument 1 must be a data frame or a named atomic vector.
Calls: .main ... withRestartList -> withOneRestart -> docall -> do.call -> fun
Quitting from lines 9-26 [unnamed-chunk-1] (test.qmd)
Execution halted
The desired output: A cell with proper bullet points that are formatted as actual bullet points in word.
(I am using vscode + quarto extension to render)
First Honour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1