r - 错误:“闭包”类型的对象不是子集 slickR
问题描述
出现错误:尝试使用 slickR 为多个输入输出幻灯片时,“闭包”类型的对象不是子集错误,我该如何解决?
observeEvent(input$imagepreview, {
output$x <- renderImage({
if (is.null(input$picture))
return(NULL)
if (input$picture == "Round Eye") {
return(list(
src = "images/roundeye.jpg",
filetype = "image/jpeg",
alt = "Face"
))
}else if (input$picture == "Wayfarer" && input$arm == "Red" && input$body == "Yellow") {
return(
output$slickR <- renderSlickR({
imgs <- list.files("C:/", pattern=".jpg", full.names = TRUE)
slickR(imgs)
})
)
}
else if (input$picture == "Square" && input$arm == "Blue" && input$body == "Green") {
return(list(
src = "images/wayfarercustom.jpg",
filetype = "image/jpeg",
alt = "This is a chainring"
))
}
}, deleteFile = FALSE) })
解决方案
推荐阅读
- c++ - 如何将 curl 下载保存在 std::string 中?
- mongodb - 使用express在mongodb中插入带有表单数据的文件
- sql-server - Azure VM SQL Server 访问
- javascript - 如何解决?节点服务器上的云代工厂与 nfs 图像上传问题
- javascript - 用于渲染 Highcharts 的 Javascript 对象的循环列表
- java - KafKa 错误 java.nio.channels.UnresolvedAddressException
- mercurial - 如何删除已推送的 Mercurial 提交?
- angular - AG-GRID 无法将图标按钮添加到我的 ag-grid 中的 ag-grid 和多选复选框的每一行
- react-native - 如何修复此错误“未定义不是对象”?
- django - VueJS 应用程序无法在移动浏览器上访问受保护的 API 端点