mainPanel argument missing in ui.r file using R's Shiny package

后端 未结 1 1696
你的背包
你的背包 2021-01-12 05:00

I am running Shiny in R to create a GUI, and I receive the following error: ERROR: argument \"mainPanel\" is missing, with no default

Howev

相关标签:
1条回答
  • 2021-01-12 05:43

    The mainPanel needs to be called inside the sidebarLayout function. See ?sidebarLayout :

    require(shiny)
    
    shinyUI(fluidPage(
      titlePanel("Approach"),
      sidebarLayout(
        sidebarPanel(
          fileInput('file1', 'Choose file to upload',
                    accept = c(
                      'text/csv',
                      'text/comma-separated-values',
                      'text/tab-separated-values',
                      'text/plain',
                      '.csv',
                      '.tsv'
                    )
          )
    
        ),
        mainPanel(
          plotOutput("plot")
        )
      )
    )
    )
    
    0 讨论(0)
提交回复
热议问题