0
我希望能够将图像下载为图像(PNG或JPEG)。让我们假设我的数据帧是DF将图像下载为图像r
output$statsTable <- renderTable({
#Printing the table
df
})
output$downloadStatsTable <- downloadHunter(
filename = function() {
paste(getwd(), '/test.png', sep = '')
},
content = function(con) {
p <- grid.table(df)
device <- function(..., width, height) grDevices::png(..., width = 12, height = 9, res = 300, units = "in")
ggsave(file, plot = p, device = device)
}
)
你的问题是什么?你的代码不工作?你会得到什么错误? –
问题是我有一个按钮,点击时会下载表格的图像,我不知道该怎么做。上面的代码不会工作,因为没有下载的情节。 – wittywillis