Learn R Programming

adaR (version 0.3.4)

public_suffix: Extract the public suffix from a vector of domains or hostnames

Description

Extract the public suffix from a vector of domains or hostnames

Usage

public_suffix(domains)

Value

public suffixes of domains as character vector

Arguments

domains

character. vector of domains or hostnames

Examples

Run this code
public_suffix("http://example.com")

# doesn't work for general URLs
public_suffix("http://example.com/path/to/file")

# extracting hostname first does the trick
public_suffix(ada_get_hostname("http://example.com/path/to/file"))

Run the code above in your browser using DataLab