body_end_section_columns: add multi columns section

Description Usage Arguments See Also Examples

View source: R/docx_section.R

Description

A section with multiple columns is added to the document.

Usage

1
body_end_section_columns(x, widths = c(2.5, 2.5), space = 0.25, sep = FALSE)

Arguments

x

an rdocx object

widths

columns widths in inches. If 3 values, 3 columns will be produced.

space

space in inches between columns.

sep

if TRUE a line is separating columns.

See Also

Other functions for Word sections: body_end_block_section(), body_end_section_columns_landscape(), body_end_section_continuous(), body_end_section_landscape(), body_end_section_portrait(), body_set_default_section()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
str1 <- "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
str1 <- rep(str1, 5)
str1 <- paste(str1, collapse = " ")

doc_1 <- read_docx()
doc_1 <- body_add_par(doc_1, value = str1, style = "Normal")
doc_1 <- body_add_par(doc_1, value = str1, style = "Normal")
doc_1 <- body_end_section_columns(doc_1)
doc_1 <- body_add_par(doc_1, value = str1, style = "Normal")
print(doc_1, target = tempfile(fileext = ".docx"))

Example output



officer documentation built on July 21, 2021, 5:07 p.m.