url_domain: Get domains from URLs

Description Usage Arguments Author(s) See Also Examples

Description

Extract the domain from a full url (e.g. "google.com" from "https://www.google.com/calendar/render")

Usage

1
url_domain(urls, extended = F)

Arguments

urls

Single URL or a vector of URLs.

extended

If TRUE, returns the domain with a subomain (if present). For instance, "www.domain.com/sub/blah/meh.html" would return "domain.com/sub". Defaults to FALSE.

Author(s)

Katya Ognyanova rstats@ognyanova.net

See Also

get_pw_tweets get_pw_pol merge_pw url_expand

Examples

1
2
3
4
5
url_domain("https://www.google.com/search?num=100&q=politwoops") 

url_domain("www.domain.com/sub/blah/meh.html", extended=TRUE)
 
 

kateto/PolitwoopsR documentation built on May 20, 2019, 7:41 a.m.