如何将R绘图图像保存到数据库? [英] How to save R plot image to database?
本文介绍了如何将R绘图图像保存到数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将绘图图像直接保存到数据库中。
I'd like to save a plot image directly to the database.
R中的最佳方法是这样做:
Is the best way in R to do this:
- 将绘图图像(png)写入文件系统
- 读取已写入的文件
- 通过查询(RODBC)将文件发送到数据库
理想情况下,我想将上述步骤1和2结合起来将png图像写入二进制连接。 R支持吗?
Ideally I'd like to combine steps 1 and 2 above by simply write the png image to a binary connection. Does R support this?
推荐答案
否,图形设备是基于文件的,因此步骤1-3是正确的。您需要四分之一来取消临时文件的链接,但仅此而已。
No, the graphics devices are file-based, so your steps 1-3 are correct. You need a fourth to unlink the temporary file but that is about it.
这篇关于如何将R绘图图像保存到数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文