Downloading an image in R notebooks

I want to download an image on my R notebook. How do you download an image? Thank you for your response.

To download to disk, you can use download.file().

If you want to include an image in a Notebook, you can use it as a link:

title: "R Notebook"
output: html_notebook

Example image:

![alt text](


If you knit this as rmarkdown, you will get an html document with your avatar. If you open the source of this html document, you will notice that the image was fully included in your document (so if it's a big image, you will get a big result).

I expect it's possible to only include a link to an image in your document, and not download it to your computer, but I don't know of an easy way (haven't really looked though).

1 Like

Thank you for responding. I will try this way.

This topic was automatically closed 21 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.