ตัวอย่างรับค่าจาก url เข้ามาใช้ใน shiny app ครับ
library(shiny) shinyApp( ui = fluidPage( textInput("text", "Text",""), textInput("text2", "Text2","") ), server = function(input, output, session) { observe({ query <- parseQueryString(session$clientData$url_search) if (!is.null(query[['text']])) { updateTextInput(session, "text", value = query[['text']]) } if (!is.null(query[['text2']])) { updateTextInput(session, "text2", value = query[['text2']]) } }) } )
ลองดูเพิ่มเติมที่ https://shiny.rstudio.com/articles/client-data.html