url_parse: Parse a url into its component pieces.

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Parse a url into its component pieces.

Usage

1

Arguments

x

A character vector of urls.

Value

A dataframe with one row for each element of x and columns: scheme, server, port, user, path, query, fragment.

Examples

1
2
3
4
url_parse("http://had.co.nz/")
url_parse("http://had.co.nz:1234/")
url_parse("http://had.co.nz:1234/?a=1&b=2")
url_parse("http://had.co.nz:1234/?a=1&b=2#def")

Example output

  scheme    server port user path query fragment
1   http had.co.nz   NA         /               
  scheme    server port user path query fragment
1   http had.co.nz 1234         /               
  scheme    server port user path   query fragment
1   http had.co.nz 1234         / a=1&b=2         
  scheme    server port user path   query fragment
1   http had.co.nz 1234         / a=1&b=2      def

xml2 documentation built on Aug. 9, 2019, 5:06 p.m.