Learn R Programming

DescTools (version 0.99.57)

WrdTable: Insert a Table in a Word Document

Description

Create a table with a specified number of rows and columns in a Word document at the current position of the cursor.

Usage

WrdTable(nrow = 1, ncol = 1, heights = NULL, widths = NULL, main = NULL,
         wrd = DescToolsOptions("lastWord"))

Value

A pointer to the inserted table.

Arguments

nrow

number of rows.

ncol

number of columns.

heights

a vector of the row heights (in [cm]). If set to NULL (which is the default) the Word defaults will be used. The values will be recyled, if necessary.

widths

a vector of the column widths (in [cm]). If set to NULL (which is the default) the Word defaults will be used. The values will be recyled, if necessary.

main

a caption for the plot. This will be inserted by InserCaption in Word. Default is NULL, which will insert nothing.

wrd

the pointer to a word instance. Can be a new one, created by GetNewWrd() or an existing one, created by GetCurrWrd(). Default is the last created pointer stored in DescToolsOptions("lastWord").

Author

Andri Signorell <andri@signorell.net>

See Also

GetNewWrd, ToWrd

Examples

Run this code
if (FALSE)  # Windows-specific example
wrd <- GetNewWrd()
WrdTable(nrow=3, ncol=3, wrd=wrd)

Run the code above in your browser using DataLab