Below is a small ioslides presentation with an embedded shiny application in one of the slides. Another slide attempts to display a png image file. When I "Run Presentation" in RStudio, the png image doesn't render, and I get a warning:
Warning in file.create(to[okay]) : cannot create file 'C:\Users\John\AppData\Local\Temp\Rtmpkty0sF\file3b247a612422_files/C:/Develop/data/smile.png', reason 'Invalid argument'
If I remove the shiny code, and remove "runtime: shiny" from the YAML, then the png image renders properly, without the warning. In this case RStudio shows a button to "knit" the presentation, instead of "Run Presentation" for the shiny application.
Similar problems were reported here:
and here:
Error adding images in ioslides
Here is my setup: Windows 9, RStudio version 0.99.473, Package: rmarkdown version: 0.7.3, Package: shiny version: 0.12.2.9001, Package: httpuv version: 1.3.3,
Here is my RMarkdown code:
---
title: "ioslides Presentation with Shiny"
author: "John Doe"
date: "August 27, 2015"
output:
ioslides_presentation:
widescreen: true
smaller: true
transition: 0.1
self_contained: true
runtime: shiny
---
## Slide with Embedded Inline Shiny Application
Below is an embedded inline shiny application:
```{r, echo=FALSE}
inputPanel(
selectInput("n_breaks", label = "Number of bins:",
choices = c(10, 20, 35, 50), selected = 20),
sliderInput("bw_adjust", label = "Bandwidth adjustment:",
min = 0.2, max = 2, value = 1, step = 0.2)
)
renderPlot({
hist(faithful$eruptions, probability = TRUE, breaks = as.numeric(input$n_breaks),
xlab = "Duration (minutes)", main = "Geyser eruption duration")
dens <- density(faithful$eruptions, adjust = input$bw_adjust)
lines(dens, col = "blue")
})
```
## Slide With a Smiling Face
