2

I am making a presentation in R and the table is too big for the slide.

I have used

{r, echo=FALSE} at the start of my code chunk so that it only produces the table and doesn't print the code but the table is too big for the slide. Does anyone know what code to use to reduce the table size. I have used {r, echo=FALSE, out.width="50%"} but this didn't work enter image description here

ano273
  • 51
  • 3
  • Does this help? [Programmatically creating Markdown tables in R with KnitR](https://stackoverflow.com/questions/15488350/programmatically-creating-markdown-tables-in-r-with-knitr) – dcarlson Dec 12 '22 at 19:23
  • I can't see how I can change the front size or reduce the overall size of the table – ano273 Dec 12 '22 at 19:25
  • I just need to add in code that will make the output fit the slides or change the font size – ano273 Dec 12 '22 at 20:01
  • It may depend on the type of presentation you are trying to build. IOSlides, Beamer, PowerPoint, Slidely? If Powerpoint, you could use flextable to set the column widths ```{r cars, echo = F, warning = F, message = F} library(flextable) flextable(data.frame(iris3), cwidth = 0.5) ``` – Susan Switzer Dec 12 '22 at 20:52
  • its IOSlides but can't see how to change it so it all fits on – ano273 Dec 13 '22 at 21:00

0 Answers0