Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

obj_rtf_border

Create an RTF Table Border Object


Description

Create an RTF Table Border Object

Usage

obj_rtf_border(
  tbl,
  border_left = "single",
  border_right = "single",
  border_top = "",
  border_bottom = "",
  border_first = "single",
  border_last = "single",
  border_color_left = NULL,
  border_color_right = NULL,
  border_color_top = NULL,
  border_color_bottom = NULL,
  border_color_first = NULL,
  border_color_last = NULL,
  border_width = 15,
  cell_height = 0.15,
  cell_justification = "c",
  cell_nrow = NULL
)

Arguments

tbl

A data frame.

border_left

Left border type. Default is "single". To vary left border by column, use character vector with length of vector equal to number of columns displayed e.g. c("single","single","single"). All possible input can be found in r2rtf:::border_type()$name.

border_right

Right border type. Default is "single". To vary right border by column, use character vector with length of vector equal to number of columns displayed e.g. c("single","single","single"). All possible input can be found in r2rtf:::border_type()$name.

border_top

Top border type. Default is NULL. To vary top border by column, use character vector with length of vector equal to number of columns displayed e.g. c("single","single","single"). If it is the first row in a table for this page, the top border is set to "double" otherwise the border is set to "single". All possible input can be found in r2rtf:::border_type()$name.

border_bottom

Bottom border type. Default is "double" indicating double line bottom border. To vary bottom border by column, use character vector with length of vector equal to number of columns displayed e.g. c("single","single","single"). All possible input can be found in r2rtf:::border_type()$name.

border_first

First top border type of the whole table. Default is "double" indicating double line bottom border. All possible input can be found in r2rtf:::border_type()$name.

border_last

Last bottom border type of the whole table. Default is "double" indicating double line bottom border. All possible input can be found in r2rtf:::border_type()$name.

border_color_left

Left border color type. Default is NULL for black. To vary left border color by column, use character vector with length of vector equal to number of columns displayed e.g. c("white","red","blue"). All possible input can be found in grDevices::colors().

border_color_right

Right border color type. Default is NULL for black. To vary right border color by column, use character vector with length of vector equal to number of columns displayed e.g. c("white","red","blue"). All possible input can be found in grDevices::colors().

border_color_top

Top border color type. Default is NULL for black. To vary top border color by column, use character vector with length of vector equal to number of columns displayed e.g. c("white","red","blue"). All possible input can be found in grDevices::colors().

border_color_bottom

Bottom border color type. Default is NULL for black. To vary bottom border color by column, use character vector with length of vector equal to number of columns displayed e.g. c("white","red","blue"). All possible input can be found in grDevices::colors().

border_color_first

First top border color type of the whole table. Default is NULL for black. All possible input can be found in grDevices::colors().

border_color_last

Last bottom border color type of the whole table. Default is NULL for black. All possible input can be found in grDevices::colors().

border_width

Border width in twips. Default is 15 for 0.0104 inch.

cell_height

Cell height in inches. Default is 0.15 for 0.15 inch.

cell_justification

Justification type for cell. Default is "c" for center justification. All possible input can be found in r2rtf:::justification()$type.

cell_nrow

Number of rows required in each cell. Default is NULL.

Value

the same tbl with additional border attributes

Specification

The contents of this section are shown in PDF user manual only.


r2rtf

Easily Create Presentation-Ready Rich Text Format (RTF) Table and Figure

v0.2.0
GPL-3
Authors
Yilong Zhang [aut, cre], Siruo Wang [aut], Simiao Ye [aut], Madhusudhan Ginnaram [aut], Merck Sharp & Dohme Corp [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.