# NOT RUN {
data(mockstudy)
# tableby example
tab1 <- tableby(arm ~ sex + age, data=mockstudy)
write2html(tab1, "~/trash.html")
# freqlist example
tab.ex <- table(mockstudy[, c("arm", "sex", "mdquality.s")], useNA = "ifany")
noby <- freqlist(tab.ex, na.options = "include")
write2pdf(noby, "~/trash2.pdf")
# A more complicated example
write2word(tab1, "~/trash.doc",
keep.md = TRUE,
reference_docx = mystyles.docx, # passed to rmarkdown::word_document
quiet = TRUE, # passed to rmarkdown::render
title = "My cool new title") # passed to summary.tableby
# }
Run the code above in your browser using DataLab