title: R Shiny Reactive plot using user selected variable
body: <p>I have recently started using R-Shiny and I have a simple problem due to which I am stuck.</p>
  
  <p>So, I am trying to build a reactive line chart where the user defines the 2 variables from the database.</p>
  
  <p>I have been able to get the variable lists for the drop down but I am not able to use the selected value to plot the line chart.</p>
  
  <p>Refer to the code:</p>
  
  <pre><code>library(shiny)
  
  shinyUI(fluidPage(
  
  # Application title
  titlePanel("ARIMAX Forecasting Tool"),
  
  sidebarLayout(
  sidebarPanel(
  
  ...
  mainPanel(
    tabsetPanel(type = "tabs", 
                tabPanel("Plot", plotOutput("plot")), 
                tabPanel("Summary")
    )
  )
  )
  ))
  </code></pre>
  
  <p>and the partial server code</p>
  
  <pre><code>shinyServer(function(input, output) {
  output$plot &lt;- renderPlot({
  inFile &lt;- input$file1
  
  if (is.null(inFile))
    return(NULL)
  
  content1=read.csv(inFile$datapath, header=input$header, sep=input$sep 
  )
  h=input$x
  k=input$ts
  
  plot(content1$k,content1$h,type="l")
  })
  })
  </code></pre>
  
  <p>I have skipped the part where I write the render UI to get the user selected <code>variables.x</code> and <code>ts</code> are the variable selected by the user for the line chart.</p>
  
  <p>I get an error in the main panel area:</p>
  
  <blockquote>
    <p>need finite xlim values</p>
  </blockquote>