如何在R中保存网页中的图像

Zaf*_*far 1 r

我的数据如工作。url 编码了制作地图所需的所有代码。

我想遍历 90 个这样的图并将它们从网站保存到我的本地磁盘。我知道如何在 R 中构建 url,但我对如何从 RStudio 保存图像没有第一个想法。

任何想法表示赞赏,丹

sco*_*coa 5

您可以使用download.file

download.file("http::/path/to/img",destfile="myimage.jpg")
Run Code Online (Sandbox Code Playgroud)

此解决方案似乎不适用于 Windows。使用 R 3.2.3 在 linux 上测试