Last data update: 2014.03.03
|
R: Get the tables from a web page
Get the tables from a web page
Description
Retrieve each of the tables in a web page. Tables that have tables nested within them will be ignored.
Usage
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
## 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)
Results
|