Description Usage Arguments Examples
Returns a named list of key-value pairs.
1 | parseQueryString(str, nested = FALSE)
|
str |
The query string. It can have a leading |
nested |
Whether to parse the query string of as a nested list when it
contains pairs of square brackets |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | parseQueryString("?foo=1&bar=b%20a%20r")
## Not run:
# Example of usage within a Shiny app
function(input, output, session) {
output$queryText <- renderText({
query <- parseQueryString(session$clientData$url_search)
# Ways of accessing the values
if (as.numeric(query$foo) == 1) {
# Do something
}
if (query[["bar"]] == "targetstring") {
# Do something else
}
# Return a string with key-value pairs
paste(names(query), query, sep = "=", collapse=", ")
})
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.