title: Rstudio shiny conditionalPanel for mainPanel
body: <p>I am trying to create a shiny web page that will have two different main and side panels. So when choosing "Case A" in the sidebarPanel, I want a specific mainPanel with a specific tabsetPanel, that will be different if I choose "Case B". After reading the documentation, I got stuck at this point:</p>
  
  <p>ui.R:</p>
  
  <pre><code>shinyUI(pageWithSidebar(
    headerPanel("This is a Shiny page"),
    sidebarPanel(
       selectInput(
          "plotType", "Plot Type",
          c("Case A","Case B")
           )
    ),
    mainPanel(
      conditionalPanel(
        condition(input.plotType == 'Case A'),
         tabsetPanel(
           tabPanel("A1",
             textOutput("This is conditionalPanel A1")
                    ),
           tabPanel("A2",
             textOutput("This is conditionalPanel A2")
                    )
           )
       ),
      conditionalPanel(
        condition(input.plotType == 'Case B'),
        tabsetPanel(
          tabPanel("B1",
            textOutput("This is conditionalPanel B1")
                    ),
          tabPanel("B2",
            textOutput("This is conditionalPanel B2")
                    )
        )
      )
    )
  ))
  </code></pre>
  
  <p>server.R:</p>
  
  <pre><code>shinyServer(function(input, output) {
  })
  </code></pre>
  
  <p>I am getting this error:    </p>
  
  <pre><code>Listening on port 50709
  Error in tag("div", list(...)) : could not find function "condition"
  Calls: runApp ... tag -&gt; conditionalPanel -&gt; div -&gt; &lt;Anonymous&gt; -&gt; tag
  Error in setwd(orig.wd) : cannot change working directory
  Calls: runApp ... conditionalPanel -&gt; div -&gt; &lt;Anonymous&gt; -&gt; tag -&gt; setwd
  Execution halted
  </code></pre>
  
  <p>Any ideas what am I missing?</p>