getbase_url()
gets the base parent from an url.
Arguments
- url
character, address of the url.
Details
get_base_url()
keeps unchanged links that do not start exactlty by
"http://" or "https://".
Examples
get_base_url("http://parent/child/archive.csv.gz")
#> [1] "http://parent"
get_base_url("https://parent/child/archive.csv.gz")
#> [1] "https://parent"
get_base_url("parent/child/archive.csv.gz")
#> [1] "parent/child/archive.csv.gz"