q.write.to.word: Export data frames and text to a Word document

View source: R/q.write.to.word.R

q.write.to.wordR Documentation

Export data frames and text to a Word document

Description

Write data frames and text to a Word document. Content to be exported must be stored in a list()

Usage

q.write.to.word(q.payload, exportpath="", docname="", colwidths=c())

Arguments

q.payload

A list()

exportpath

Path relative to the working directory where exported files will be saved e.g. "/OUTPUT". Always begin with a backslash and end without one. If left empty, file will be exported to the working directory.

docname

String - File name for the Word document to be created

colwidths

A vector of 3 lengths (in cm) specifying the width of the first, middle and last column(s) respectively. If the table to be exported has only 2 columns, the first and last elements of the vector are used. If empty, automatic widths will be applied based on column content.

Value

A Word document

Examples

groupA <- c(20, 30)
groupB <- c(12, 37)
pValue <- c(0.033, NA)
db <- matrix(data=c(groupA, groupB, pValue), nrow = 2, ncol = 3)
q.write.to.word(db, docname="Output.doc")

qwickmalik/qwickr documentation built on March 30, 2022, 2:59 p.m.