Is there any way that i can use button click event via shiny GUI to call a R Script? -
i trying develop gui in shiny. have made r scripts. want call r script via button click event (run r script when click on button)
i'm guessing interested in developing set of global objects. in shiny's terminology:
objects defined in
global.rsimilar defined inserver.routside shinyserver(), 1 important difference: visible code inui.r. because loaded global environment of r session; r code in shiny app run in global environment or child of it.
as discussed here. further on similar lines, can source scripts shiny:
# objects in file shared across sessions source('all_sessions.r', local=true) shinyserver(function(input, output) { # objects in file defined in each session source('each_session.r', local=true) output$text <- rendertext({ # objects in file defined each time function called source('each_call.r', local=true) # ... }) }) i suggest have @ linked article matter of sourcing code outside server.r , ui.r discussed in detail.
Comments
Post a Comment