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

rmarkdown 1.7 breaks Shiny R Markdown documents #1193

Closed
eddelbuettel opened this issue Nov 10, 2017 · 7 comments
Closed

rmarkdown 1.7 breaks Shiny R Markdown documents #1193

eddelbuettel opened this issue Nov 10, 2017 · 7 comments
Labels
bug
Milestone

Comments

@eddelbuettel
Copy link

@eddelbuettel eddelbuettel commented Nov 10, 2017

Today's upgrade of my workstation to current CRAN got me rmarkdown 1.7. Which appears to have a bad effect on shiny apps using flexdashboard -- of which we have a few. The log now shows

Warning in dygraph(X, group = "Plot") :
  restarting interrupted promise evaluation
Warning in dygraph(X, group = "Plot") :
  restarting interrupted promise evaluation
Warning: Error in <reactive:data>: object 'input' not found
Stack trace (innermost first):

indicating that something goes astray with reactives. Not sure if it is a shiny server bug. The MRE below was set up on a (very current) Ubuntu 17.04 machine (aka my laptop) onto which the most recent shiny-server .deb was installed too. Everything else CRAN current, and Ubuntu current.

---
title: "Rmd Bug"
output: flexdashboard::flex_dashboard
runtime: shiny
---


```{r setup, include=FALSE}
suppressMessages({
    library(xts)
    library(dygraphs)
})

data <- reactive({
    n <- as.numeric(input$days)
    x <- xts(100+cumsum(rnorm(n)), order.by=Sys.Date()+seq(-(n-1):0))
    x
})

doPlot <- function(X) {
    dg <- dygraph(X, group="Plot")
    dg <- dyOptions(dg, colors = "blue", stepPlot=TRUE, strokeWidth=1) 
    dg <- dyRangeSelector(dg)
}
```

Column {.sidebar data-with=100 }
--------------------------------

<p>

```{r}
textInput("days", "Days", 100)
```

Column
-----------------------------------------------------------------------

```{r}
renderDygraph(doPlot(data()))
```
@yihui yihui added the bug label Nov 10, 2017
@yihui yihui added this to the v1.8 milestone Nov 10, 2017
@yihui
Copy link
Member

@yihui yihui commented Nov 10, 2017

Thanks for the report! I have minimized the reproducible example and will try to fix the issue later:

---
title: "Rmd Bug"
output: html_document
runtime: shiny
---

```{r}
textInput("days", "Days", 100)
```

```{r}
renderPrint(input$days)
```

@yihui yihui changed the title rmarkdown 1.7 creates side effect breaking flexdashboard shiny apps rmarkdown 1.7 breaks Shiny R Markdown documents Nov 10, 2017
@eddelbuettel
Copy link
Author

@eddelbuettel eddelbuettel commented Nov 10, 2017

Good point re MRW. It really is "just" input not propagating.

@yihui
Copy link
Member

@yihui yihui commented Nov 10, 2017

Should be fixed now. Thanks for the report!

yihui added a commit that referenced this issue Nov 10, 2017
yihui added a commit that referenced this issue Nov 10, 2017
@yihui yihui mentioned this issue Nov 10, 2017
3 tasks
@jjallaire
Copy link
Member

@jjallaire jjallaire commented Nov 10, 2017

@yihui Should be consider a patch release to CRAN for this?

@yihui
Copy link
Member

@yihui yihui commented Nov 11, 2017

@jjallaire Yes, definitely. This bug is pretty bad.

@andreaslang
Copy link

@andreaslang andreaslang commented Nov 14, 2017

I suppose there is no workaround except downgrading to a previous version?

@yihui
Copy link
Member

@yihui yihui commented Nov 14, 2017

@andreaslang You can install the latest version (>=1.8) via

install.packages('rmarkdown')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug
Projects
None yet
Development

No branches or pull requests

4 participants