Convert between relative and absolute urls.
See also
xml_url
to retrieve the URL associated with a document
Examples
url_absolute(c(".", "..", "/", "/x"), "http://hadley.nz/a/b/c/d")
#> [1] "http://hadley.nz/a/b/c/" "http://hadley.nz/a/b/"
#> [3] "http://hadley.nz/" "http://hadley.nz/x"
url_relative("http://hadley.nz/a/c", "http://hadley.nz")
#> [1] "/a/c"
url_relative("http://hadley.nz/a/c", "http://hadley.nz/")
#> [1] "a/c"
url_relative("http://hadley.nz/a/c", "http://hadley.nz/a/b")
#> [1] "c"
url_relative("http://hadley.nz/a/c", "http://hadley.nz/a/b/")
#> [1] "../c"