我仍然是新手,并且有光泽,而且我很难接受原本应该是简单的逻辑.我试图在imageOutput小部件中显示pdf文件,但没有运气.有人能引导我朝正确的方向发展吗?
样本ui.R
shinyUI(pageWithSidebar(
mainPanel(
selectInput("sel_ed",
label = "View outputs for Ecodistrict:",
choices = c(244,245,247,249),
selected = NULL,
multiple = FALSE),
imageOutput("imp_pdf",width="500px",height="500px")
))
Run Code Online (Sandbox Code Playgroud)
样本服务器.R
shinyServer(function(input, output, session) {
importance <- function(inputSpecies){
img_dir <- pdf(paste(inputSpecies,"\\models\\MATL\\MATRF_Importance",sep=""))
}
output$imp_pdf <- renderImage({importance(input$sel_ed)})
})
Run Code Online (Sandbox Code Playgroud)
我得到的大多数错误都与预期的字符向量参数或原子向量有关.我知道闪亮或多或少的设计用于渲染和显示图像或绘图,但必须有一种方法来显示已经在本地驱动器上的pdf ..