Learn R Programming

compareGroups (version 3.3)

export2word: Exports tables to Word files.

Description

This function creates automatically a Word file with the table.

Usage

export2word(x, file, which.table="descr", nmax = TRUE, header.labels = c(), ...)

Arguments

x

an object of class 'createTable' or that inherits it.

file

character specifying the word file (.doc or .docx) resulting after compiling the Markdown code corresponding to the table specified in the 'x' argument.

which.table
header.labels
...

currently ignored

See Also

createTable, export2latex, export2pdf, export2csv, export2html, export2md

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
require(compareGroups)
data(regicor)

 # example on an ordinary table
res <- createTable(compareGroups(year ~ . -id, regicor), hide = c(sex=1), hide.no = 'no')
export2word(res, file = "table.docx")

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab