Plot not filling the slide in R presentation - r

If I make a default R presentation in Rstudio, everything looks okay, but the plot doesn't fill the whole slide.
This is the same whether in full screen or in the browser.
The documentation says "When the only content on a slide is an image, then the image will fill all available space on the slide". And it mentions that same goes for plots.
What am I missing here? What do I need to do to have the plot fill the whole slide?
I updated my RStudio to Version 0.99.903

Use out.width="100%" in your chunk options
{r, echo=FALSE, out.width="100%"}

Related

Bookdown - Add space between side by side figures using knitr::include_graphics

The recomended way to include existing images in bookdown is using knitr::include_graphics.
For example, to put two images side by side code will be something like:
```{r myfigure fig.show='hold', fig.align='center', out.width='50%', fig.cap = ""}
fig1_path <- paste0(fig_path,"image1.png")
fig2_path <- paste0(fig_path,"image2.png")
knitr::include_graphics(c(fig1_path, fig2_path))
```
However, this produces html and latex where the images are very close each other. It would be desirable to add some space/padding/margin between to look better.
For the html case, this is easy to fix because we can add some external css to control the space. However, for the latex output i don't have any decent solution yet.
Im thinking a portable workaround could be to add an extra empty image between or add lateral space to both images, but i prefer to hear better suggestions.

Side by side images are not working in r markdown

I am trying to place side by side images in r markdown beamer using the code below.
```{r, out.width='.49\\linewidth', fig.cap='caption', fig.show='hold', fig.align='default'}
knitr::include_graphics(c('figures/yield.png', 'figures/boxplot_yield.png'))
However, the images somehow were vertically stacked, instead of horizontally. Please see the resulted plot below. Any ideas??
When I ran your code with my own pictures, they rendered side by side, you may need to make the pictures a smaller resolution and then your code should do what you want

Reduce size of a plot in R notebooks preview

Graphs in Rstudio notebooks generated using "Preview Notebook" take all the width of the HTML page. For example, for the default RStudio notebook:
I would like the plot to be smaller in the HTML page, not taking all the width.
I tried fig.width and fig.height, but they do not modify the space that the the plot occupies. For example for fig.width=1 and fig.height=1 the output looks like this:
This was a problem with the older version of RStudio. After updating RStudio to 1.3.1093, fig.width and fig.height allow you to make the plot smaller.

Hold added image position in R markdown

I want to add an image in the middle of R markdown report, but when I knit it to pdf, the image appears on the top of the page, not in the intended place. Here is what I use in R markdown:
![help_dataframe_screenshot](help_dataframe_screenshot.png)
Anyone knows how to fix it? I need the image at where I insert it, not on the page top.

Viewer pane is printing in the wrong dimensions

My plots are showing up with the titles way too zoomed it. They are printing like my available space is much smaller than it really is. It was working fine before. I've tried to reset it with dev.off() and par(mfrow=c(2,2)).
plot(mtcars$mpg)
Do you see how the dimensions are weird? I've also tried to clear the preivous plots.
This is the same plot printed on another computer with the viewerport set to about the same size.

Resources