2014-01-15 4 views
0

R 반짝이로 웹 앱을 만들려고합니다. 내 애플 리케이션에서 나는 3 tabPanels 싶어요. 이R 반짝이 업로드 오류

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'))을 사용할 수 있도록 파일을 업로드 할 .. 내 코드입니다. 문제는 내 파일을 업로드하지 않은 세 번째 tabpanel에 주석을 넣으려고하면 어떻게됩니까 ?? 이유를 모르겠어. 나 좀 도와 줄 수있어?

정말 문제를 얻을하지 않습니다, 그러나 이것은 나를 위해 노력하고 있습니다

답변

0

:

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)) 
관련 문제