Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R脚本将图像插入Google工作表_R_Google Sheets_R Googlesheets - Fatal编程技术网

R脚本将图像插入Google工作表

R脚本将图像插入Google工作表,r,google-sheets,r-googlesheets,R,Google Sheets,R Googlesheets,有没有办法使用R脚本将图像(在本例中为ggplot2图表)插入到Google工作表中?可能使用googlesheets软件包 我知道如何在我的浏览器中通过“工作表”菜单中的“插入->图像”将图像添加到Google工作表中。但是我想从R脚本中将图像添加到我的工作表中。这有点像黑客,默认情况下,图像的大小正好是一个单元格。但这是一种插入图像的方法: x这个成功了!实际上,IMAGE()函数接受模式、高度和宽度的值,因此您可以按需要的大小插入图像。例如,x x <- gs_edit_cells(

有没有办法使用R脚本将图像(在本例中为ggplot2图表)插入到Google工作表中?可能使用
googlesheets
软件包


我知道如何在我的浏览器中通过“工作表”菜单中的“插入->图像”将图像添加到Google工作表中。但是我想从R脚本中将图像添加到我的工作表中。

这有点像黑客,默认情况下,图像的大小正好是一个单元格。但这是一种插入图像的方法:


x这个成功了!实际上,
IMAGE()
函数接受
模式
高度
宽度
的值,因此您可以按需要的大小插入图像。例如,
x
x <- gs_edit_cells(ss=x, ws="y", input='=IMAGE("https://i.stack.imgur.com/FrDZc.jpg")')