title: displaying a pdf from a local drive in shiny
body: <p>I'm still new to r and shiny, and i'm stumped with what should otherwise be simple logic. I am trying to display pdf files in imageOutput widgets but with no luck. Could someone steer me in the right direction?</p>
  
  <p>sample ui.R</p>
  
  <pre><code>shinyUI(pageWithSidebar(
  mainPanel(
    selectInput("sel_ed",
                label = "View outputs for Ecodistrict:", 
                choices = c(244,245,247,249), 
                selected = NULL,
                multiple = FALSE),
  
    imageOutput("imp_pdf",width="500px",height="500px")
  ))
  </code></pre>
  
  <p>sample server.R</p>
  
  <pre><code>shinyServer(function(input, output, session) {
  
  importance &lt;- function(inputSpecies){
  img_dir &lt;- pdf(paste(inputSpecies,"\\models\\MATL\\MATRF_Importance",sep=""))
  }
  
  output$imp_pdf &lt;- renderImage({importance(input$sel_ed)}) 
  
  })
  </code></pre>
  
  <p>Most of the errors i get have to do with expected character vector arguments, or atomic vectors. I know that shiny is more or less designed to render AND display images or plots but there has to be a way to display pdf's that are already on a local drive..</p>