1
我在Shiny应用程序文件夹的images文件夹中有预渲染的图像。我试图让应用呈现图片EXG.jpeg,但只有替代文字出现。出了什么问题?R闪亮 - 无法显示预渲染图像
\服务器文件
setwd('C:/Users/E0265074/Documents/PrelimShiny/')
function(input, output) {output$Option1 = renderUI({
if (input$study == 'EX') {
selectInput('differ', label='Patient ID', choices = c('013412-826-001-002','013412-840-001-001','013412-840-001-002','013412-840-001-003','013412-840-001-004'))
}
})
output$plot <- renderImage({
return(list(
src = "./images/EXG.jpeg",
contentType = "image/jpeg",
alt = "Face"
))
})
})
\ UI文件
library(shiny)
shinyUI(fluidPage(
titlePanel('Biomarker Comparison'),
sidebarLayout(sidebarPanel(
tabsetPanel(type = c('tabs'),
tabPanel('Plot 1 Options', selectInput('study', label = 'Study Type', choices = c('EX')),
uiOutput('Option1'),
uiOutput('Option2'),
uiOutput('Option3')
),
tabPanel('Plot 2 Options', selectInput('studya', label = 'Study Type', choices = c('EX')),
uiOutput('Option1a'),
uiOutput('Option2a'),
uiOutput('Option3a')
)
),
),
mainPanel(imageOutput('img1')
)
)
))
你标记为'shiny-server'的任何特定原因? –