r - 我们可以在 r shiny 应用程序的框中渲染多个图像吗?
问题描述
我正在尝试在 R Shiny 应用程序的一个框中渲染多个图像。对于图像,我指的是我拥有这些图像的位置。现在,当我在文件夹中只有 1 个图像时,图像会被渲染,但是一旦我在该位置有超过 1 个图像,它就不会渲染任何东西。
在服务器中使用以下代码创建该文件夹中存在的图像列表
output$images <- renderImage({
file <- list.files('~/www', pattern=NULL, all.files=FALSE,full.names=T)
file <- as.data.frame(file)
filename <- normalizePath(file.path(file$file))
filename <- as.list(filename)
list(src = filename) # List gets created till this point but image is not rendered
}, deleteFile = FALSE)
解决方案
推荐阅读
- python - 是否可以在 pandas 数据框中有多个索引?
- python - Django 模型在本地工作,但在部署后不工作
- azure - Azure Devops 使用产品待办事项而不是 sprint 中的任务
- ios - SWIFT:触摸屏幕时未调用 touchesEnded
- reactjs - 我是新来的反应,当我点击提交按钮时没有任何反应?
- javascript - D3.js 从版本 3 升级到版本 4/5 - 图表未填充
- firebase - core.js:4197 错误类型错误:无法读取未定义的属性“TwitterAuthProvider”
- python - 如何拆分由对象制成的数据框?
- admob - 分析显示在 Admob 中,而不是在 Adsense 中
- excel - VBA - 从两个数据列表循环并复制匹配项