Making an Rpresentation in Rstudio with knitr I have a slide with just one picture, which I want to fill out the whole screen/slide. How do I do that?
The second sli
If you're using reveal.js in Rmarkdown, applying the {data-background="my_img.png"}
argument to a new slide allows you to use a newly generated plot as the image background for that slide, which fills out the entire device area without needing to modify any device output specs.
R plots are saved in the my_pres_files/figure-revealjs/ folder in your local dir. Attributing a name to the code chunk for the plot in your Rmd file will give the plot png file that name in this dir. E.g.
```{r, myplot}
# r code to generate plot
# name the code chunk to attribute a name to the image file of the plot in your local dir
```
This will give you the following path:
"my_pres/my_pres_files/figure-revealjs/myplot-1.png"
Then use this path in the `data-background = "my_img.png" argument.
# {data-background="my_pres/my_pres_files/figure-revealjs/myplot-1.png"}