View source: R/write_methods_doc.R
| write_methods_doc | R Documentation |
Generates a Word document containing boilerplate methods text for all three
table types produced by TernTables (descriptive, two-group comparison, and
three-or-more-group comparison). Each section is headed by a clear label so
the user can copy the relevant paragraph directly into a manuscript. When
called from ternG, the two-group or multi-group section is populated
with the statistical tests that were actually used; all other sections use
generic boilerplate. When called from ternD, all comparison sections
use generic boilerplate.
write_methods_doc(
tbl,
filename,
n_levels = 2,
OR_col = FALSE,
source = "ternG",
post_hoc = FALSE
)
tbl |
A tibble created by |
filename |
Output file path ending in |
n_levels |
Number of group levels used in |
OR_col |
Logical; whether odds ratios were calculated. Default |
source |
Character; |
post_hoc |
Logical; whether pairwise post-hoc testing was requested
( |
Invisibly returns the path to the written Word file.
data(tern_colon)
tbl <- ternG(tern_colon, exclude_vars = c("ID"), group_var = "Recurrence",
methods_doc = FALSE)
write_methods_doc(tbl, filename = file.path(tempdir(), "methods.docx"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.