r2rtf is an R package to create production-ready tables and figures in RTF format. The package is designed with these principles:
%>%
).The R for clinical study reports and submission book provides tutorials by using real world examples.
You can install the package via CRAN:
install.packages("r2rtf")
Or, install from GitHub:
remotes::install_github("Merck/r2rtf")
The R package r2rtf provides flexibility to enable features below:
"|"
.color()
function).library(dplyr)
library(r2rtf)
head(iris) %>%
rtf_body() %>% # Step 1 Add attributes
rtf_encode() %>% # Step 2 Convert attributes to RTF encode
write_rtf(file = "ex-tbl.rtf") # Step 3 Write to a .rtf file
Click here to see the output
Click here to see the output
Click here to see the output
If you use this software, please cite it as below.
Wang, S., Ye, S., Anderson, K., & Zhang, Y. (2020). r2rtf—an R Package to Produce Rich Text Format (RTF) Tables and Figures. PharmaSUG. https://pharmasug.org/proceedings/2020/DV/PharmaSUG-2020-DV-198.pdf
A BibTeX entry for LaTeX users is
@inproceedings{wang2020r2rtf,
title = {{r2rtf}---an {R} Package to Produce {Rich Text Format} ({RTF}) Tables and Figures},
author = {Wang, Siruo and Ye, Simiao and Anderson, Keaven M and Zhang, Yilong},
booktitle = {PharmaSUG},
year = {2020},
url = {https://pharmasug.org/proceedings/2020/DV/PharmaSUG-2020-DV-198.pdf}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.