I'm looking for a function which can extract the domain name from a URL in R. Any function which is similar to tldextract in R? EDIT: Currently i'm using the below approach:
domain=substr(as.character("www.google.com"),
which(strsplit("www.google.com",'')[[1]]=='.')[1]+1, nchar("www.google.com"))
But i'm looking for a pre-defined function which can save the coding effort.