Replies: 1 comment
-
Pipe table, the one you are using, is not able to be read by Pandoc for multiline cells, see https://pandoc.org/MANUAL.html#tables for details about this. So yes, you need something else than pipe table, you can use HTML table as described (now) in https://quarto.org/docs/authoring/tables.html#html-tables. Alternatively, you can use ---
format: markdown
---
```{r}
library(pander)
# Define a Markdown pipe table
md_table <- "| Column 1 | Column 2 | Column 3 |\n| --- | --- | --- |\n| A | B | C |\n| D | E | F |\n"
# Convert the Markdown pipe table to a data frame
df <- read.table(text = md_table, sep = "|", header = TRUE, stringsAsFactors = FALSE)
df <- df[, -c(1, ncol(df))]
# Convert the data frame to a grid table using pander
pander(df, style = "grid")
``` |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi,
if I use this qmd
the docx output does not apply a carriage return where I have the
<br>
tag.Is the "Grid tables", the only way to have a carriage return in the docx table output?
If yes, do you know some cli tool to convert json or csv to "Grid tables"?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions