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

Using meta-variants shouldn't effect normal execution #57

Closed
cpsievert opened this issue Jul 17, 2019 · 2 comments
Closed

Using meta-variants shouldn't effect normal execution #57

cpsievert opened this issue Jul 17, 2019 · 2 comments

Comments

@cpsievert
Copy link
Collaborator

cpsievert commented Jul 17, 2019

Currently we're expanding !! in normal execution, is that still necessary?

library(shiny)
library(shinymeta)
library(dplyr)

ui <- fluidPage(
  selectInput("var", "Var", names(mtcars)),
  verbatimTextOutput("txt")
)

server <- function(input, output, session) {
  output$txt <- metaRender(renderPrint, {
    group_var <- sym(input$var)
    mtcars %>%
      group_by(!!group_var) %>%
      summarise(mean_mpg = mean(mpg))
  })
}

shinyApp(ui, server)
Error in enquo: object 'group_var' not found
@cpsievert cpsievert added bug Something isn't working and removed bug Something isn't working labels Jul 17, 2019
@cpsievert
Copy link
Collaborator Author

cpsievert commented Jul 17, 2019

Or maybe expansion is needed, because without it, code that you write that you intend to work for meta-execution might not work for normal execution?

@cpsievert
Copy link
Collaborator Author

Done in #59

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

No branches or pull requests

1 participant