Using Rmarkdown to make slides with xaringan
. I want text explaining the code on the left column and the code itself on the right. On each slide, the first time I try it, it works; but the second time it gets clunky: the right column starts after the left column is finished and are misaligned.
YAML header
---
title: "reprex-left.right"
author: "Ramon Gallego"
date: "4/10/2020"
output: xaringan::moon_reader
---
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
```
The first time you do it works fine
.pull-left[
```{r}
y <- data.frame(A = LETTERS[1:5],
B = 1:5,
C = sqrt(6:10))
```
]
.pull-right[
Some text in here talking abut indexing, dataframes, accessing stuff
]
The second time it seems to start the second column below the left column
.pull-left[
See how the right box is going down
so down.
]
.pull-right[
```{r}
y <- data.frame(A = LETTERS[1:5],
B = 1:5,
C = sqrt(6:10))
```
]
And the output of the Rmarkdown looks like this
Should I be using these functions differently? Does this look like a bug?