Our developers monitor these forums and answer questions periodically. If you have questions about this article or would like to discuss ideas presented here, please post on RStudio Community. When calling session$sendCustomMessage, keep in mind that this is, in reactive-programming speak, a side effect, and therefore something that generally needs to be done in an observe or observeEvent rather than a reactive or eventReactive. Either use this input value as part of your reactive expressions, output renderers, and observers or use observeEvent(input$foo, shinyApp ( ui, server ) While this is normally done using an input binding, you can skip all the ceremony and directly send a reactive input value to R with this JavaScript function:įor example, tInputValue("foo", "bar") will cause the server’s input$foo to be set to "bar". From JavaScript to RĬommunication from JavaScript to R works by setting a reactive input. See this article to learn about your options for doing that. In both cases, you’ll also need to know how to package your JavaScript code with your Shiny app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |