metrumresearchgroup / pmtables

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

caption option in st2report() doesnt work when using stable_long() #217

Open barrettk opened 3 years ago

barrettk commented 3 years ago

The caption option in st2report() doesnt seem to take effect when using stable_long(). When swapping stable_long() for stable() the caption works as designed.

Reproducible Example

data <- iris %>% head(30)
sumDat.out <- data %>% st_new() %>%
  st_panel("Species") %>%
  stable_long(r_file = thisScript, output_file = "test.tex",
              sizes = tab_size(col=3))

caption <- "This is a table caption"

st2report(sumDat.out, ntex=2, caption=caption)
packageVersion("pmtables")
[1] ‘0.3.1’

Output

image