I have a document wherein I am able to successfully display single images - referenced by a variable containing the image name - with chunks as follows:
```{r echo = FALSE, out.width = '100%'}
knitr::include_graphics(paste0(source_image_path,image_filename))
```
What I need is to be able to do this for two images and display them side by side with control over their respective width percentages. I tried this solution but one of the images is very grainy when imported this way, I cannot control the width percentages, and the total width is smaller than I'd like.
I also tried
```{r, out.width = "50%"}
img1 <- paste0(source_image_path,image_filename1)
img2 <- paste0(source_image_path,image_filename2)
myimages <- list(img1,img2)
include_graphics(myimages)
```
based on what I found here; this looks better but I'm not sure how I can control the width percentages of the individual images. I tried using
include_graphics(myimages,dpi = c(2,85))
without effect.
So how can I display 2 images, side by side, referenced by variables, and still control the individual width percentages?