I am trying to add some chemical structure images to some plots I have created. I am using the ACToR database to access the chemical structures. For example:
(Just posting my comment as an answer)
You can use the download.file function to download files from the web.
In addition, Windows users may have to alter some of the arguments. It seems that mode="wb" is a necessary argument to download and view these png files correctly.
So, something like:
download.file("http://actor.epa.gov/actor/image?format=png%3Aw1000%2Ch1000&casrn=80-05-7",
destfile="tmp.png", mode="wb")
worked for me.