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 -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -