title: R Shiny: Error in max - min : non-numeric argument to binary operator
body: <p>I am trying to create a simple shiny app for plotting histogram inside rstudio running on Amazon ec2 for my result data stored as .RData file. I have double checked everything. It looks fine.
  I have also checked the data types: all are numeric.</p>
  
  <p>My codes:</p>
  
  <p><strong>ui.R</strong></p>
  
  <pre><code>    # shiny plots on top_docs data
  library(shiny)
  shinyUI(fluidPage(
   # Header title
    titlePanel(title = h4("Top doctors plots - a histograms", align = "center")),
  
    # Sidebar with a slider input for number of bins
  sidebarLayout(
  sidebarPanel(
  sliderInput(
  selectInput("var", "1, Select the variables from top doc summary file", 
  choices =c( "service_total" = 1, 
                "ben_total" = 2,
                "payment" = 3, 
                "charged" = 4, 
                "allowed" = 5, 
                "unique_services_per_patient" = 6, 
                "duplicates_per_service" = 7, 
                "services_per_patient" = 8), selected= 1 ),
          br(),
          sliderInput("bins", "2, Select the number of BINs for histogram", min = 5, max = 40, value=20),
          br(),
          radioButtons("color", "3, Select the color of histogram", choices =c("Green", "Red", "Yellow"), selected= "Green")
  
      )),
  
      # Show a plot of the generated distribution
      mainPanel(
        plotOutput("myhist")
      )
    ))
  )
  </code></pre>
  
  <p><strong>server.R</strong></p>
  
  <pre><code>`library(ggplot2)
  library(shiny)
  options(shiny.error=browser)
  
  load("/******/top_docs.RData", envir=.GlobalEnv)
  shinyServer(function(input, output) {
  
    output$myhist &lt;- renderPlot({
  
      # generate var based on input$var from ui.R
      col &lt;- as.numeric(input$var)
      hist(top_docs[,col], breaks = seq(0, max(top_docs[,col], l = input$bins+1), col=input$color, main="Histogram of Top docs", xlab=names(top_docs[col])))
  
    })
  
  })
  `
  </code></pre>