0

I'm trying to create a powerpoint presentation using RStudio, closely following these instructions. Though I'm missing something and the two columns configuration won't work. I'm using RStudio Server 1.2.5036 on a Ubuntu machine and also this rmarkdown::pandoc_version() [1] ‘2.3.1’. The troubleshooting page didn't help me either.

My code is pretty much a copypasta from the tutorial page, but to be sure, here it is:

---
title: "something"
author: "me"
date: "01/01/2020"
output:
  ioslides_presentation: default
  slidy_presentation: default
  beamer_presentation: default
  powerpoint_presentation: default
---

```{r setup, include=FALSE}
library("readxl")
my_data <- read_excel("data/my_data.xlsx")
```

## Intro

Loren Ipsun

## About the data

:::::::::::::: {.columns}
::: {.column}
```{r summary, echo = FALSE}
summary(my_data)
```
:::
::: {.column}
```{r boxplot, fig.height = 6, fig.width = 4, fig.align = "right"}
boxplot(my_data)
```
:::
::::::::::::::

It produces three slides, correct content but the column content shows underneath of each other. Am I missing something obvious?

thanks a lot!

filippo
  • 5,583
  • 13
  • 50
  • 72

1 Answers1

0

There are 4 output formats in your Rmd file. If you just include powerpoint and/or beamer your knitted file should be rendered with two columns as desired.

If you want to use slidy_presentation you could do the following:

<div class='left' style='float:left;width:48%'>
  code or image for left of slide
</div>
<div class='right' style='float:right;width:48%'>
  code or image for right
</div>

as described here or with a custom layout as described here.

For ioslides_presentation, see this answer which nicely describes forcing a break between two columns with ioslides. (And again, you can simply add html tags as with the slidy_presentation example above.)

Ben
  • 28,684
  • 5
  • 23
  • 45