wdReplaceTextByTable: Replaces a string with a table created from a dataframe

Description Usage Arguments Value TODO Examples

View source: R/addons.R

Description

This function replaces a piece of text with a table created using a dataframe.

Usage

1
wdReplaceTextByTable(find, x, wdapp = .R2wd)

Arguments

find

A string.

x

A dataframe.

Value

Invisibly returns a pointer to new table object.

TODO

handle case if text is found multiple times. May a version createTable which can be passed a Range object from the search function is te better choice.s

Examples

1
2
3
4
5
6
file <- system.file("inst/template.docx", package = "R2wdaddons")
wdGet2(file)

# add a table at placeholder
d <- mtcars[1:10, 1:6]
tbl <- wdReplaceTextByTable("[placeholder 3]", d)

markheckmann/R2wdaddons documentation built on Sept. 13, 2019, 8:40 a.m.