metrumresearchgroup / pmtables

TeX tables for pharmacometrics.
https://metrumresearchgroup.github.io/pmt-book
11 stars 1 forks source link

Multiple st_asis() calls w/i a code chunk prints #219

Closed curtisKJ closed 3 years ago

curtisKJ commented 3 years ago

Summary

When using st_asis to render a table that's been written out to disk in a knitted Rmd, I'm noticing that if I have more than one call to st_asis in a chunk, it'll render the tables, but there'll be a """=latex in between successive tables. With just one call per chunk, it's OK, no message.

Per @kylebaron

It seems like this only happens when echo is false; probably need to put a newline after each table when printing them out. you can throw writeLines("") in between then tables for now Or in a new block

library(pmtables)
library(dplyr)
data <- slice(stdata(), 1:3)
data %>% stable() %>% st_asis()
writeLines("")
data %>% stable() %>% st_asis()
kylebaron commented 3 years ago

Closed for #224