Learn R Programming

NHSDataDictionaRy (version 1.2.5)

tableR: tableR function

Description

This function uses the scapeR parent function to return a table of elements

Usage

tableR(url, xpath, title = "Not Specified", add_zero_prefix = FALSE, ...)

Arguments

url

The URL of the website to scrape the table element from

xpath

The unique xpath of the HTML element to be scraped

title

Unique name for the relevant HTML table that has been scraped

add_zero_prefix

Adds zero prefixes to certain codes that get converted by native functions

...

Function forwarding to parent function to pass additional arguments to function

Value

A tibble (class data.frame) output from the results of the web scrape

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

  • DictType - defaults to Not Specified if nothing passed, however allows for custom dictionary / data frame tags to be created

  • DttmExtracted - a date and time stamp