Inserting graphics into R flexdashboards

#1

Having troubles resizing graphics that I am inserting to flexdashboards. I can insert an image (*.png) but am unable to resize it.

include_graphics(imagePath, dpi=50)

I've tried setting width, height, dpi and the image remains the same.
Jef

0 Likes

#2

If you're inserting these within code chunks, are the out.width and out.height options not working?

What happens if you run the following?

```{r  out.width = "50%", out.height = "50%"}
include_graphics(imagePath) 
```
0 Likes

#3

jdb

Tried those too, no change to the image. The image simply fills the flexdashboard chart area.

Jeff

0 Likes

#4

Maybe this section in the documentation will have your answer. It deals with using graphics inside flexdashboards

0 Likes

#5

yes ```{r, fig.width=10, fig.height=10} did the trick

0 Likes

#6

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

0 Likes

closed #7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes