[英]R Shiny upload error
我正在尝试使用R Shiny构建Web应用程序。 在我的应用程序中,我想要3个tabPanels。 这是我的代码。
tabsetPanel(
tabPanel("Plot",plotOutput(outputId = "main_plot", height = "500px")),
tabPanel("name",
h1("example"),
conditionalPanel(condition = "input.ta == true",
tableOutput('values1'),
tags$hr(),
verbatimTextOutput('textDisplay')
)
),
tabPanel("Frequency Analysis",
# h1("example2"),
# tableOutput('values2'),
#tags$hr(),)
) )
我想上传文件,所以我使用fileInput('file1', 'Choose a file t/plain', '.txt'))
。 问题是,如果我尝试在第三个选项卡中放入注释,则不会上传文件? 我不明白原因。你能帮我吗?
我没有真正解决您的问题,但这对我有用:
library(shiny)
ui <- basicPage(
tabsetPanel(
tabPanel("Plot",
plotOutput(outputId = "main_plot", height = "500px")),
tabPanel("name",
h1("example"),
conditionalPanel(condition = "input.ta == true",
tableOutput('values1'),
tags$hr(),
verbatimTextOutput('textDisplay')
)
),
tabPanel("Frequency Analysis",
h1("example2"),
sidebarPanel(fileInput("files", "Choose file")),
tableOutput('values2'),
tags$hr())
)
)
server <- function(input,output){}
runApp(list(ui=ui,server=server))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.