title: Scaling shiny plots to window height
body: <p>I want to scale a shiny plot to the height of the window.  This <a href="https://stackoverflow.com/questions/17838709/scale-and-size-of-plot-in-rstudio-shiny">related SO question</a> only uses absolute height specifications in pixels, when a <code>height = 100%</code> would be preferable.  I note in the documentation that <code>absolutePanel</code> can achieve this with its <code>top, bottom, left, right</code> arguments, but then you lose the side panel, and in any case the plot (while scaling to width) seems to ignore available height.</p>
  
  <p>I'm guessing this relates to the html quirk that means you need to get the height with javascript <code>innerHeight</code> variable.  But I'm unclear how to implement a solution in shiny to get <code>ui.R</code> to utilise this.  Grateful for any pointers.</p>
  
  <p>A basic app model for development:</p>
  
  <p><strong>ui.R</strong></p>
  
  <pre><code>library(shiny)
  shinyServer(
    function(input, output) {
      output$myplot &lt;- renderPlot({
        hist(rnorm(1000))
      })
    }
  )
  </code></pre>
  
  <p><strong>server.R</strong></p>
  
  <pre><code>library(shiny)
  pageWithSidebar(
    headerPanel("window height check"),
    sidebarPanel(),
    mainPanel(
      plotOutput("myplot")
    )
  )
  </code></pre>