View source: R/build_query_string.R
build_query_string | R Documentation |
Given a list of filters (key-value pairs), this functions returns a url query string that can be applied to an api endpoint. Multiple list elements are separated by a '&' and list elements with multiple values are returned as comma separated values.
build_query_string(filters)
filters |
list |
A formatted string that matches the url search parameters
Adam Cottrill adam.cottrill@ontario.ca
# return "?size=sm" build_query_string(list(size="sm")) # return "?colour=red,blue" build_query_string(list(colours=c("red","blue"))) # return "?size=sm&colour=red,blue" build_query_string(list(size='sm', colours=c("red","blue")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.