title: Displaying Output of Expression Using Shiny Reactive Input in RMarkdown
body: <p>My rmd file is below. It should be easily reproducible as it just uses Sys.Date() and the slider input.</p>
  
  <pre><code>---
  output: html_document 
  runtime: shiny
  ---
  
  ```{r, echo=FALSE, error=FALSE, message=FALSE}
  sliderInput("daysback", "Days back from today: ", min=1, max=45, value=30, step=1)
  
  renderText({input$daysback})
  
  display_date = reactive({Sys.Date() - input$daysback})
  observe(print(display_date()))
  ```
  </code></pre>
  
  <p>renderText({input$daysback}) correctly displays the input value, and updates it as the user moves the slider.</p>
  
  <p>However observe(print(display_date)) isn't displaying anything. I took the observe(print()) approach from the example below, from the SO answer <a href="https://stackoverflow.com/questions/26789243/using-values-from-a-reactive-input-to-directly-input-into-a-custom-function">using values from a reactive input to directly input into a custom function</a></p>
  
  <pre><code>num_square = reactive({input$num^2}) 
  observe(print(num_square()))
  </code></pre>
  
  <p>Also, although no dates are displaying in the viewer pane when I click "Run Document" in RStudio, the RStudio console (RMarkdown-tab) is showing dates as I move the slider in the viewer pane. A sample of the output (a row is added each time I move the slider):
  Output created: </p>
  
  <blockquote>
    <p>C:/Users/vuser/AppData/Local/Temp/RtmpSiQ52I/file125c17cd231.html 
    [1] "2015-04-28" 
    [1] "2015-05-08" 
    [1] "2015-04-27" 
    [1] "2015-05-03"</p>
  </blockquote>
  
  <p>So I can't figure out why it won't display in the launched document. </p>