Description Usage Arguments Details Value See Also Examples
url_parse
takes a vector of URLs and splits each one into its component
parts, as recognised by RfC 3986.
1 | url_parse(urls)
|
urls |
a vector of URLs |
It's useful to be able to take a URL and split it out into its component parts -
for the purpose of hostname extraction, for example, or analysing API calls. This functionality
is not provided in base R, although it is provided in parse_url
; that
implementation is entirely in R, uses regular expressions, and is not vectorised. It's
perfectly suitable for the intended purpose (decomposition in the context of automated
HTTP requests from R), but not for large-scale analysis.
Note that user authentication/identification information is not extracted;
this can be found with get_credentials
.
a data.frame consisting of the columns scheme, domain, port, path, query and fragment. See the 'relevant IETF RfC for definitions. If an element cannot be identified, it is represented by an empty string.
param_get
for extracting values associated with particular keys in a URL's
query string, and url_compose
, which is url_parse
in reverse.
1 | url_parse("https://en.wikipedia.org/wiki/Article")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.