Assemble Data Frames from HTML Tables

HTML tables are a valuable data source but extracting and recasting these data into a useful format can be tedious. This package allows to collect structured information from HTML tables. It is similar to `readHTMLTable()` of the XML package but provides three major advantages. First, the function automatically expands row and column spans in the header and body cells. Second, users are given more control over the identification of header and body rows which will end up in the R table, including semantic header information that appear throughout the body. Third, the function preprocesses table code, corrects common types of malformations, removes unneeded parts and so helps to alleviate the need for tedious post-processing.


htmltab: Hassle-free HTML tables in R

CRANstatus R-CMD-check Project Status: Unsupported – The project has reached a stable,usable state but the author(s) have ceased all work on it. A newmaintainer may bedesired.

HTML tables are a valuable data source but extracting and recasting these data into a useful format can be tedious. htmltab is a package for extracting structured information from HTML tables. It is similar to readHTMLTable() of the XML package but provides two major advantages:

  1. First, the function automatically expands row and column spans in the header and body cells.
  2. Second, users are given more control over the identification of header and body rows which will end up in the R table.

Additionally, the function preprocesses table code, removes unneeded parts and so helps to alleviate the need for tedious post-processing.

Installation

You can install the released version of htmltab from CRAN with:

install.packages("htmltab")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("htmltab/htmltab")

Usage

To see htmltab in action, take a look at the case studies in this blog post, the package vignette, or the package manual.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("htmltab")

0.8.2 by Gerhard Burger, 5 years ago


https://github.com/htmltab/htmltab


Report a bug at https://github.com/htmltab/htmltab/issues


Browse source code at https://github.com/cran/htmltab


Authors: Christian Rubba [aut] , Gerhard Burger [ctb, cre] , Roman Cheplyaka [ctb]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports XML, httr

Suggests testthat, knitr, tidyr, rmarkdown, spelling


See at CRAN