powered by
Split host into subdomains and domain
split_host(host)
A tibble with one row per hostname and columns for top-level domain, domain and subdomains. Columns are created as many as the number of hosts' components and are named as tld, domain, subdomain_1, subdomain_2, etc.
A character vector of hostnames to be split.
split_host(c("subdomain.example.com")) split_host(c("subdomain2.subdomain1.example.com", "example.com"))
Run the code above in your browser using DataLab