Learn R Programming

r2rtf (version 0.1.1)

rtf_title: Add title attributes to the table

Description

add title, subtitle, and other attributes to the object

Usage

rtf_title(
  tbl,
  title = NULL,
  subtitle = NULL,
  font = 1,
  format = NULL,
  font_size = 12,
  color = NULL,
  background_color = NULL,
  justification = "c",
  indent_first = 0,
  indent_left = 0,
  indent_right = 0,
  space = 1,
  space_before = 180,
  space_after = 180,
  new_page = FALSE,
  hyphenation = TRUE
)

Arguments

tbl

a data frame

title

title string

subtitle

subtitle string

font

text font type

format

text format

font_size

text font size

color

text color

background_color

text background color

justification

justification for text

indent_first

first indent

indent_left

left indent

indent_right

right indent

space

paragraph space

space_before

line space before text

space_after

line space after text

new_page

boolean value to indicate whether to start a new page

hyphenation

boolean value to indicate whether to use hyphenation

Value

the same data frame tbl with additional attributes for table title

Examples

Run this code
# NOT RUN {
library(dplyr) # required to run examples
data(tbl_1)
tbl_1 %>% rtf_title(title = "ANCOVA of Change from Baseline at Week 8") %>%
  attr("rtf_heading")

# }

Run the code above in your browser using DataLab