Learn R Programming

NHSDataDictionaRy (version 1.2.5)

linkScrapeR: linkScrapeR

Description

This is used to scrape all hyperlinks from a specific web page.

Usage

linkScrapeR(url, SSL_needed = FALSE)

Arguments

url

The website URL to detect active anchor hyperlink tags and extract them into a tibble

SSL_needed

Default - FALSE - Boolean to indicate whether to need a SSL certificate

Value

A tibble (class data.frame) with all active hyperlinks on the website for the URL (uniform resource locator) passed to the function.

  • result - the extracted html table from url and xpath passed

  • link_name - the name of the link

  • url - the full url of the active href tag from HTML

Details

Once the links have been scraped they will be outputted into a tibble for exploration.

This can be used on any website to pull back the hyperlink content of a web page.

Examples

Run this code
# NOT RUN {
linkScrapeR("https://www.datadictionary.nhs.uk/", FALSE)
# }

Run the code above in your browser using DataLab