Learn R Programming

⚠️There's a newer version (1.1.3) of this package.Take me there.

Overview

Create RTF table and figure with flexible format.

Installation

  1. Download the package in this code repository.
  2. Unzip the file.
  3. Open the *.Rproj file by Rstudio.
  4. In Rstudio console, run devtools::install().

Highlighted Features

The R package r2rtf provided flexibility to provide features below:

  • Necessary options to create highly customized RTF table and figure.
  • Simple to use parameters and data structure.
    • Customized column header: split by “|”.
    • Three required parameters for the output tables (data, filename, column relative width).
    • Flexible and detail control of table structure.
  • Format control in cell, row, column and table level for:
    • Border Type: single, double, dash, dot, etc.
    • Alignment: left, right, center, decimal.
    • Column width.
    • Text appearance: bold, italics, strikethrough, underline and any combinations.
    • Font size.
    • Text and border color (657 different colors named in color() function).
    • Special characters: any character in UTF-8 encoding (e.g. Greek, Symbol, Chinese, Japanese, Korean).
  • Append several tables into one file.
  • Pagination.
  • Built in raw data for validation.

Copy Link

Version

Install

install.packages('r2rtf')

Monthly Downloads

3,518

Version

0.2.0

License

GPL-3

Maintainer

Yilong Zhang

Last Published

December 4th, 2020

Functions in r2rtf (0.2.0)

adae

An Adverse Event Dataset
as_rtf_color

Create RTF Color Encode
as_rtf_init

Create RTF Header Encode
as_rtf_colheader

Create Column Header RTF Encode
as_rtf_margin

Create RTF Page Margin Encode
as_rtf_font

Create RTF Font Encode
as_rtf_end

End RTF Encode
HAMD17

An Efficacy Clinical Trial Data to Evaluate a Drug to Reduce Lower Back Pain
adsl

A Subject Level Demographic Dataset
as_rtf_source

Create Data Source RTF Encode
as_rtf_subline

Create Table Subline RTF Encode
as_rtf_pageby

RTF Table Page By Encoding
as_rtf_paragraph

Create Paragraph RTF Encode
as_rtf_new_page

Create RTF New Page Encode
as_rtf_footnote

Create Footnote RTF Encode
border_type

RTF Border Type Dictionary
check_args

Check Argument Types, Length or Dimension
rtf_footnote

Add Footnote Attributes to Table
color_table

RTF Text Color Dictionary
cell_size

Calculate Cell Size in Twips
rtf_group_by_enhance

Remove Duplicate Records
match_arg

Argument Verification Using Partial Matching
rtf_page_header

Add RTF Page Header Information
font_type

RTF Text Font Dictionary
rtf_source

Add Data Source Attributes to the Table
as_rtf_page

Create RTF Page Size Encode
footnote_source_space

Derive Space Adjustment
as_rtf_table

Combine RTF Table Encoding
rtf_pageby

Add Table Body Pageby Attributes to Table
convert

Convert Symbol to ANSI and Unicode Encoding
rtf_subline

Add Subline Attributes to Table
rtf_title

Add Title Attributes to Table
unicode_latex

Dictionary of Unicode and Latex Code
rtf_encode_figure

Render Figure to RTF Encoding
rtf_body

Add Table Body Attributes to the Table
rtf_paragraph

Paragraph to RTF Encode
obj_rtf_text

Create an RTF Text Object
write_rtf

Write an RTF Table or Figure to an RTF File
font_format

RTF Text Format Dictionary
rtf_read_png

Read PNG Figures into Binary Files
set_margin

Define Margin Type
rtf_encode_table

Render Table to RTF Encoding
obj_rtf_border

Create an RTF Table Border Object
as_rtf_title

Create Table Title RTF Encode
utf8Tortf

Convert a UTF-8 Encoded Character String to a RTF Encoded String
justification

RTF Text Justification Dictionary
rtf_encode

Render to RTF Encoding
inch_to_twip

Convert Inches to Twips
rtf_colheader

Add Column Header Attributes to Table
rtf_page

Add RTF File Page Information
write_rtf_para

Write a Paragraph to an RTF File
rtf_table_content

Create RTF Table Body Encode
rtf_figure

Add Figure Attributes
rtf_text

Text to RTF Encode
tbl_2

Between Group Results from an ANCOVA Model
rtf_encode_list

Render List to RTF Encoding
rtf_page_footer

Add RTF Page Footer Information
tbl_3

Root Mean Square Error from an ANCOVA model
spacing

RTF Paragraph Spacing Dictionary
tbl_1

Within Group Results from an ANCOVA Model