I am trying to add and resize a local image to a .Rmd
file in RStudio that will produce a pdf. I can add the file easily with

but I have not figured out how to control the size of the image. I tried HTML code with a width attribute, but the image would not appear (I think this only works if outputting to HTML).
<img src="path/file.png" width="200px" />
I could not get this idea to work:

Is there a way to modify the Rmarkdown script to modify the size of the local image with only RMarkdown and base R?
There is a suggestion to use the png
and grid
packages, but I am limited to base R for my problem. For other users, however, I think this looks like a good solution.