Include LaTeX code from R objects into markdown <p>I am writing up a report where the output gets pushed to a <code>xlsx</code> document via <code>library(xlsx)</code>. This data then feeds into a table especially formatted with LaTeX code that formats the output:</p> <pre><code>```{r import_results, echo = F} if(!file.exists("Analysis/results.xlsx")){ wb &lt;- xlsx::createWorkbook(type = "xlsx") sheets &lt;- xlsx::createSheet(wb, "data") }else{ wb &lt;- loadWorkbook("Analysis/results.xlsx") sheets &lt;- removeSheet(wb, "data") sheets &lt;- xlsx::createSheet(wb, "data") } getSheets(wb) addDataFrame(sheet = sheets, x = Results1) addDataFrame(sheet = sheets, x = Results2, startRow = nrow(Results1)+2) addDataFrame(sheet = sheets, x = Results3, startRow = nrow(Results1)+ nrow(Results2) + 4) xlsx::saveWorkbook(wb, "Analysis/results.xlsx") } </code></pre> <p><a href="https://i.stack.imgur.com/C57f1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C57f1.jpg" alt="Excel view"></a> After writing to sheet that table data is linked to, I read it back into R, now with all the LaTeX in the cells and in essence I want to <code>cat</code> results so they are LaTeX code, but it prints the <code>data.frame</code> as a long string when I <code>knit</code>:</p> <pre><code>```{r, echo = F, results='asis'} wb &lt;- read.xlsx("Analysis/results.xlsx", sheetName = "import", header=F) row.names(wb) &lt;-NULL wb ``` </code></pre> <p><a href="https://i.stack.imgur.com/Fwk7K.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fwk7K.jpg" alt="Output"></a></p> <p>What is the appropriate way to automate this cross platform integration?</p>