I\'m very new at R Markdown and I\'m putting together an R Markdown HTML page for some new R users at my work to give them an intro and walk them through some simple demos.
If you are exporting to pdf you can do this in the header with includes.
Without using css files I have created a two-column environment using the following.
1st: I created the file header.tex
. header.tex
includes the following statements:
\usepackage{multicol}
\newcommand{\btwocol}{\begin{multicols}{2}}
\newcommand{\etwocol}{\end{multicols}}
2nd: I put the following command into my document header
---
title: "My title"
author: "My name"
date: "Today"
output:
beamer_presentation:
highlight: haddock
includes:
in_header: header.tex
keep_tex: yes
---
Here is an example of the body and a picture of the output with two columns.
***********
\btwocol
```{r, results="asis"}
print("test")
```
Here is some text that also is in two column environment.
\etwocol
Now only one column
And here is what the slide looks like: