View source: R/format.demoTable.r
format.demoTable | R Documentation |
Format a tabulated summary for LaTeX
## S3 method for class 'demoTable'
format(x, ..., formula)
x |
output from |
... |
ignored |
formula |
the same formula as used to create the |
Table with summarized data formatted for inclusion in LaTeX (character matrix)
This function is primarily used for demographics tables
tabStats
, tabSummarize
options(width = 150)
pkpdData = example.pkpdData()
ok = duplicated(pkpdData$id) == FALSE
myFormula = dose ~ race + wt + bmi + sex
my.formatted.demoTable = format(
tabSummarize(formula = myFormula, data = pkpdData[ok, ], digits = 3),
formula = myFormula
)
library(xtable)
my.xtable <- xtable(my.formatted.demoTable)
print(my.xtable
, sanitize.text.function = identity
, booktabs = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.