getTables: Get the tables from a web page

Description Usage Arguments Value Author(s) See Also Examples

Description

Retrieve each of the tables in a web page. Tables that have tables nested within them will be ignored.

Usage

1
getTables(URL)

Arguments

URL

A character string of a URL, usually beginning with http://

Value

A list, where each item is a table in the webpage.

Author(s)

David Diez, Andrew Bray

See Also

processTable, getURL

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
URL     <- "http://en.wikipedia.org/wiki/Poverty_in_the_United_States"
Tables  <- getTables(URL)
thisOne <- which(sapply(Tables, "[", 1, 1) == "Persons in Family Unit")
if(length(thisOne) > 0){
  Tables[[thisOne[1]]]
}

## End(Not run)

OIdata documentation built on May 2, 2019, 2:14 p.m.