title: Interactive renderplot graph with multidimensional dataset
body: <p>I am trying to run an interactive rshiny plot. I have this output: 
  <img src="https://i.stack.imgur.com/wu8s9.png" alt="shiny output in browser"></p>
  
  <p>I want to be able to subset and plot by country, by scenario, by variable, by year (4 selections). I also want to be able to add value points by year and not have the whole plot by year done immediately.<br>
  I am only able to subset by country. My scenario and variable dropdowns are not reactive. And it plots all variables with all scenarios although I want one variable plot by one scenario and one country  </p>
  
  <p>How can I make my graph interactive? </p>
  
  <pre><code>library(reshape2)
  library(lattice)
  library(plyr)
  library(shiny)
  library(dplyr)
  library(abind)
  library(ggplot2)
  
   ui &lt;- fluidPage(
    titlePanel("Comparing Trend and PP policies by MDGs and funding"),  
    sidebarLayout(
      sidebarPanel(
        radioButtons("radio", label = h3("Country"),choices=unique(dmiubf$country), selected = ""),
        selectInput("Senario","Show senario:", choices = unique(dmiubf$scn)),
        selectInput("var","Show senario:", choices = unique(dmiubf$var)),
        selectInput("year","Show vertical line in year(s):", choices = unique(dmiubf$year),multiple=TRUE)
      ),
      mainPanel(
        plotOutput("chart")
      )
    )
  )
  
  server &lt;- function(input, output) {
    cr &lt;- reactive({
      a = dmiubf[dmiubf$var==input$var, dmiubf$scn==input$senario]&lt;-dmiubf[dmiubf[,"country"]=="Costa Rica",input$senario]&lt;-"base"
      dmiubf
    })
  
    output$chart &lt;- renderPlot({
      req(input$radio)
      if (input$radio==c("Costa Rica")) {
        plot0&lt;-ggplot(data=cr()) + geom_point(aes(x=year,y=pcn, fill=scn),
                                              size = 6)
        print(plot0)
        }
    })
  }
  
  shinyApp(ui = ui, server = server)
  </code></pre>