r-lib / ymlthis

write YAML for R Markdown, bookdown, blogdown, and more
https://ymlthis.r-lib.org/
Other
164 stars 10 forks source link

Errors with yml_params() with shiny input. #36

Closed apreshill closed 5 years ago

apreshill commented 5 years ago

Hey @malcolmbarrett,

I'm experiencing issues whenever I try to use yml_params() with shiny input. Here is a reprex using this from the vignette:

library(tidyverse)
library(ymlthis)

yml() %>%
  yml_params(
    data = shiny_file("Upload Data (.csv)"),
    n = shiny_numeric("n to sample", 10),
    date = shiny_date("Date"),
    show_plot = shiny_checkbox("Plot the data?", TRUE)
  )
#> Internal error: Expected call in `quo_invert()`

Created on 2019-09-29 by the reprex package (v0.3.0)

R Markdown spits out this error:

Screen Shot 2019-09-29 at 6 05 26 PM
malcolmbarrett commented 5 years ago

Thanks! I can't replicate this, but I'm wondering if I have an unrealized version dependency between imported packages. Could you try re-installing rlang, shiny, and purrr? It would be helpful for me if you could do it one at a time. Then we'd know which (if any) solved it

apreshill commented 5 years ago

woohoo that fixed it! Thank you :) It was odd because I had existing code in some xaringan slides that worked but last night wouldn't knit for me. I wonder what happened with those other packages? Anyway, solved!

malcolmbarrett commented 5 years ago

Good! Any sense of which package update fixed it?

apreshill commented 5 years ago

I would bet rlang, and I never explicitly use it so probably only updates upon installation of packages that use it. I had just updated shiny for another reason, so not that one.