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

expandChain shouldn't require invokation of it's input #77

Open
cpsievert opened this issue Nov 6, 2019 · 0 comments
Open

expandChain shouldn't require invokation of it's input #77

cpsievert opened this issue Nov 6, 2019 · 0 comments

Comments

@cpsievert
Copy link
Collaborator

As pointed out by @schloerke, expandChain(output$Summary) this is likely more intuitive than expandChain(output$Summary()). It seems like we could support either way?

library(shiny)
library(shinymeta)

ui <- fluidPage(
  selectInput("var", label = "Choose a variable", choices = names(cars)),
  verbatimTextOutput("Summary"),
  verbatimTextOutput("code")
)

server <- function(input, output) {
  var <- metaReactive({
    cars[[..(input$var)]]
  })
  output$Summary <- metaRender(renderPrint, {
    summary(..(var()))
  })
  output$code <- renderPrint({
    expandChain(output$Summary())
  })
}

shinyApp(ui, server)
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