Convert a character vector of provided urls into a character vector of unique identifiers for use in downstream functions.

create_id(urls)

Arguments

urls

A character vector of urls.

Value

A character vector of unique identifiers.

Examples

urls <- c('https://www.reddit.com/r/nba/', 'https://www.reddit.com/r/nfl/', 'https://vancouver.craigslist.org/search/apa', 'https://www.kaggle.com/search?q=nba')
create_id(urls)
#> [1] "reddit"     "reddit.1"   "craigslist" "kaggle"    
'reddit  reddit.1  craigslist  kaggle'
#> [1] "reddit  reddit.1  craigslist  kaggle"