2017-11-25 1 views
0

이것은 내 최초의 반짝이는 응용 프로그램으로, 내 Coursera 데이터 과학 전문 분야의 일부입니다. 설명서 용 탭을 만들려고하는데 메인 탭의 출력이 MainApp 탭과 Documentation 모두에 표시됩니다.Shiny App이 여러 탭에 출력을 표시합니다.

"문서"탭에 출력이 필요 없음

도움이 필요하십니까? 감사!

shinyUI(
    pageWithSidebar(
    headerPanel (" Six Sigma Control Charts"), 



     tabsetPanel(


     tabPanel("MainApp", 
       sidebarPanel(
        h5 ("Control Charts are six sigma tools that track process statistics over time to detect the presence of special causes of variation. There are different types of charts according to the data type that you are analysing."), 

        selectInput("DataType", "Please select Data Type", 
           choices = c("Continuous", "Attribute")), 
        conditionalPanel(condition = "input.DataType == 'Continuous'", 
            selectInput("Groups", "Data collected in groups?", 
               choices = c("Yes", "No"))), 
        conditionalPanel(condition = "input.DataType == 'Attribute'", 
            selectInput("Counting", "What are you counting?", 
               choices = c("Defective items", "Defects per unit"))), 


        conditionalPanel(condition = "input.Groups == 'Yes' & input.DataType == 'Continuous' ", 
            textInput ("SubgroupSize", "Enter sub group size",1) ) 


       )), 

     tabPanel("Documentation", 

       h5 ("This Shiny App helps you to familiarise with Six Sigma Control Charts."), 
       h5 ("The different types of graphs are produced according to the type of data that you want to analyse"), 
       h5 ("Make a choice according to the data type to explore the various Six Sigma graphs") 
     ) 





    ), 



    mainPanel (

      plotOutput ("ControlChart"), 
      textOutput("Explanation"), 
      br(100), 
      br() 


    ) 


) 

) 

답변

0

그것은 pageWithSidebar 기능을 할 수 없습니다 :

이것은 ui.R 코드입니다. 이 함수는 더 이상 사용되지 않습니다. fluidPagenavbarPage에 넣으십시오.

# Define UI 
ui <- navbarPage("App Title", 
       tabPanel("Plot", 
          fluidPage(
          sidebarLayout(

           # Sidebar with a slider input 
           sidebarPanel(
           sliderInput("obs", 
              "Number of observations:", 
              min = 0, 
              max = 1000, 
              value = 500) 
          ), 

           # Show a plot of the generated distribution 
           mainPanel(
           plotOutput("distPlot") 
          ) 
          ) 
         ) 

       ), 
       tabPanel("Summary", 
          tags$br("Some text")) 
) 

# Server logic 
server <- function(input, output) { 
    output$distPlot <- renderPlot({ 
    hist(rnorm(input$obs)) 
    }) 
} 

# Complete app with UI and server components 
shinyApp(ui, server) 
+0

대단히 감사합니다. 이제 과제를 완료 할 수 있습니다. –

관련 문제