使用下面的代码,我只会显示替代文字.关于可能出现什么问题的任何建议?
来自server.R:
output$face <- renderImage({
list(src = "http://www.clipartbest.com/cliparts/yco/GGE/ycoGGEacE.png",
filetype = "image/png",
alt = "YOU MUST BE KIDDING ME!")
}, deleteFile = FALSE)
Run Code Online (Sandbox Code Playgroud)
来自ui.R:
imageOutput("face")
Run Code Online (Sandbox Code Playgroud)
谢谢,
乍得
添加到问题的解释 - 我不只是尝试显示图像.相反,我试图让它反应 - 并显示一个不同的图像,基于输入...每服务器.R代码如下:
output$imagegauge <- renderImage({
if (is.null(IRR_calc()))
return(NULL)
if (IRR_calc() > .085) {
return(list(
src = "http://www.i2symbol.com/images/abc-123/o/white_smiling_face_u263A_icon_256x256.png",
contentType = "image/png",
alt = "Smiley Face"
))
} else {
return(list(
src = "http://www.clipartbest.com/cliparts/yco/GGE/ycoGGEacE.png",
filetype = "image/png",
alt = "Sad Face"
))
}
}, deleteFile = FALSE)
Run Code Online (Sandbox Code Playgroud)
再次感谢,
乍得