I have a R markdown file that I want to output rmarkdown from the script itself. For example, I would have the following simple code in an Rmd file.
---
title: \
Why build the header markup (either in markdown or HTML) manually? Try inline R expressions or some helper functions in pander
(to generate markdown programatically):
---
title: "test"
author: "johndoe"
date: "September 5, 2015"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## `r 'This is a Heading in Code'`
```{r title, results='asis'}
library(pander)
pandoc.header("This is a Heading in Code", level = 2)
```
```{r cars, results='asis'}
summary(cars)
```