result_table: Create a results table

Description Usage Arguments Details Value See Also

Description

result_table make a table with results to be inserted into Microsoft Word

Usage

1
result_table(mydoc, test, table.title = "", group = "group", cram = NULL)

Arguments

mydoc

Either a docx object, or string as "html", "flextable", "cat", "cont", or "table"

test

A data frame

table.title

An optional character string

group

An optional character string indicating the name of the column to group on; defaults to "group", set group to NULL to remove grouping

cram

An optional character vector of column names or a logical; if TRUE then all logical and 2-level factor variables will report both levels

Details

This function takes a data frame and converts it to a FlexTable. If mydoc is a docx object, then the FlexTable is added to the docx object which is returned. The docx object can then be written to a Microsoft Word document.

If mydoc is the string "html", then an HTML FlexTable is returned. If mydoc is "flextable", then the FlexTable object is returned. If mydoc is "cat", then the detailed tableone summary of the categorical variables is returned. If mydoc is "cont", then the detailed tableone summary of the continuous variables is returned.

Value

A docx object

See Also

FlexTable


bgulbis/BGTools documentation built on May 12, 2019, 8:21 p.m.