r - How do you pass parameters to a shiny app via URL -


in web browsers pass parameters website like

www.mysite.com/?parameter=1

i have shiny app , use parameter passed in site in calculations input. possible www.mysite.com/?parameter=1 , use input!parameter?

can provide sample code or links?

thank you

you'd have update input when app initializes based on url. use session$clientdata$url_search variable query parameters. here's example, can expand needs

library(shiny)  shinyapp(   ui = fluidpage(     textinput("text", "text", "")   ),   server = function(input, output, session) {     observe({       query <- parsequerystring(session$clientdata$url_search)       if (!is.null(query[['text']])) {         updatetextinput(session, "text", value = query[['text']])       }     })   } ) 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -