I'm currently using RStudio Version 1.2.1335 in a Mac laptop. Everytime after running a code chunk in Markdown to plot something or import a jpg image, after a while that same images will block my view when I change from lines to write on other parts of Markdown. I have to go where the plot code is, "open and close" it again so it doesn't block my view when working in other parts. If I click on the consol window, it the image will automatically pop again and block my view of the Rmarkdown code.
One option would be to disable inline output for R Markdown documents. This way, instead of appearing in your document, the plot will be displayed in the Plots pane.
You can disable inline output by going to Tools -> Global Options... -> R Markdown and unchecking the box that says "Show output inline for all R Markdown documents". This will disable the inline plots generated by code chunks, like the one in screenshot above. Note that you may have to close and re-open RStudio for this new setting to apply.
If you also want to disable previewing of imported images (i.e. via the Markdown syntax , then in the same menu you can change the setting for "Show equation and image previews" from "Inline" to either "In a popup" (the image will be displayed in a thumbnail if you hover your mouse over the that line) or "Never".
Here's a screenshot of R Markdown Global Settings after disabling inline output from code chunks and displaying imported images in a popup:
Realized I hadn't modified the "Show equiation and image previews", change it to "In a popup", restarted RStudio, but no change to display. Plots still block my Rmd codes.
This sort of thing has happened to me occasionally in the past but not frequently enough to know how to reproduce the problem at will so I never opened a GitHub issue.
At least for me, the problem is solved by "clearing all output" and running all code chunks again.
Or in extreme occations deleting the hidden .Rproj.user folder on the project.