## 3.6 Rich Text Format document

To create a Rich Text Format (RTF) document from R Markdown, you specify the rtf_document output format in the YAML metadata of your document:

---
title: "Habits"
author: John Doe
date: March 22, 2005
output: rtf_document
---

If you know the RTF format really well, you can actually embed raw RTF content in R Markdown. For example, you may create a table in RTF using other software packages, and insert it to your final RTF output document. An RTF document is essentially a plain-text document, so you can read it into R using functions like readLines(). Now suppose you have an RTF table in the file table.rtf. To embed it in R Markdown, you read it and pass to knitr::raw_output(), e.g.,

{r, echo=FALSE}