Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plots from code chunks with spaces in name do not deploy properly in ShinyApps.io #153

Open
sharlagelfand opened this issue Jan 29, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@sharlagelfand
Copy link

commented Jan 29, 2017

When I deploy an app to ShinyApps.io and a code chunk with a space in its name has a plot, the plot does not render on ShinyApps.io

Without a space

---
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
---

```{r ChunkName}
plot(rnorm(10))
````

renders fine in RStudio/browser and deploys fine to ShinyApps.io -- https://sharlagelfand.shinyapps.io/no_space_in_chunkname/

But with a space...

---
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
---

```{r Chunk Name}
plot(rnorm(10))
````

Also renders fine in RStudio/browser, but the image doesn't work properly on ShinyApps.io, just empty https://sharlagelfand.shinyapps.io/space_in_chunk_name/

rsconnet::showLogs() shows

Warning in normalizePath(path, winslash = winslash, mustWork = mustWork) :
path[1]="figure-html/Chunk Name-1.mb.png": No such file or directory
@jjallaire

This comment has been minimized.

Copy link
Member

commented Jan 29, 2017

@jspiewak and @kippandrew Any reason you can think of that this would be happening?

@jspiewak

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

Because the file has a space in the name.
Easily reproducible locally on a Mac with the addition of runtime: shiny

@jjallaire

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

@sharlagelfand It looks like chunk names with spaces just don't work right now.

@jjallaire jjallaire closed this Jan 30, 2017

@jjallaire jjallaire reopened this Jan 30, 2017

@jjallaire

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

@jmcphers Is this something which would be straightforward to overcome?

@jmcphers

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

That's a good question! I spent some time debugging this and didn't find an obvious culprit in rmarkdown; it looks like the images are getting correctly rendered and placed, but that Shiny isn't serving them (was able to reproduce the problem in a simple Shiny app). I've gotten in touch with the Shiny team and will file an issue over there if that turns out to be the problem.

@jmcphers

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

Appears to be due to rstudio/shiny#1565.

@sharlagelfand

This comment has been minimized.

Copy link
Author

commented Feb 1, 2017

I'll get used to not using a space, and start putting runtime: shiny in my code -- thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.