Does R have any package for parsing out the parts of a URL?

后端 未结 6 744
无人及你
无人及你 2020-12-30 06:32

I have a list of urls that I would like to parse and normalize.

I\'d like to be able to split each address into parts so that I can identify \"www.google.com/test/in

6条回答
  •  误落风尘
    2020-12-30 06:59

    You can use the function of the R package httr

     parse_url(url) 
     >parse_url("http://google.com/")
    

    You can get more details here: http://cran.r-project.org/web/packages/httr/httr.pdf

提交回复
热议问题