【发布时间】:2018-05-28 00:37:12
【问题描述】:
我正在尝试将图像添加到 R 格式的 DT 包中的数据表中。我发现了这个问题:How to embed an image in a cell a table using DT, R and Shiny 它适用于在线图像。但是当我尝试添加我在本地拥有的图像(使用R 创建)时,它就不会出现。这是我的问题的一个例子:
x = rnorm(1000)
png(paste0("Graficas/test.png"))
Plot = plot(x, type = "l")
dev.off()
camino = '<img src="Graficas/test.png" height="30"></img>'
data = data.frame(0.5,camino)
datatable(data, escape = FALSE)
我不明白为什么会这样
【问题讨论】: