Learn R Programming

berryFunctions (version 1.4)

googleLink2pdf: extract pdf link from google search result

Description

restrict pdf link from a google search to actual link with text processing

Usage

googleLink2pdf(googlelink)

Arguments

googlelink
Character: A search result address

Value

  • Characterstring with only the basic link

See Also

strsplit, gsub

Examples

Run this code
Link <- paste0("http://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1",
        "&cad=rja&sqi=2&ved=0CDIQFjAA&url=http%3A%2F%2Fcran.r-project.org",
        "%2Fdoc%2Fmanuals%2FR-intro.pdf&ei=Nyl4UfHeOIXCswa6pIC4CA",
        "&usg=AFQjCNGejDwPlor4togQZmQEQv72cK9z8A&bvm=bv.45580626,d.Yms")
googleLink2pdf(Link)

Run the code above in your browser using DataLab