From the course: Creating Reports and Presentations with R Markdown and RStudio

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Change the size of individual outputs

Change the size of individual outputs - RStudio Tutorial

From the course: Creating Reports and Presentations with R Markdown and RStudio

Start my 1-month free trial

Change the size of individual outputs

- [Narrator] Let's take a look at how to change the size of individual charts in an R markdown document by modifying code chunk options. To do this, we're going to navigate to folder 06_03 in our exercise files. And we'll open the R studio project. There are two R markdown files here, we're going to start with a PDF document first. So let's open that up and let's knit that together. Okay, so here's my PDF report. I have some text, I have some code, I have an okay looking base R chart. And let's scroll down and see my GG plot 2 chart. Okay, this is slightly too short, can you see this label here of the species? There's not really enough space for that so let's modify the height of this chart. We'll go back to the R markdown file and we'll scroll down to the code chunk that contains the GG plot 2 chart. Okay, here we are. Now there's a little cog here and if I click on that and select use custom figure size, it allows me to specify an explicit width and height in inches. I'm going to…

Contents