Description Usage Arguments Value See Also Examples
URLs often have queries associated with them, particularly URLs for
APIs, that look like ?key=value&key=value&key=value
. param_set
allows you to modify key/value pairs within query strings, or even add new ones
if they don't exist within the URL.
1 | param_set(urls, key, value)
|
urls |
a vector of URLs. These should be decoded (with |
key |
a string representing the key to modify the value of (or insert wholesale if it doesn't exist within the URL). |
value |
a value to associate with the key. This can be a single string,
or a vector the same length as |
the original vector of URLs, but with modified/inserted key-value pairs. If the
URL is NA
, the returned value will be - if the key or value are, no insertion
will be made.
param_get
to retrieve the values associated with multiple keys in
a vector of URLs, and param_remove
to strip key/value pairs from a URL entirely.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.