% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/html_getTables.R
\name{html_getTables}
\alias{html_getTables}
\alias{html_getTable}
\title{Extract tables from an HTML page}
\usage{
html_getTables(url = NULL, header = NA)

html_getTable(url = NULL, header = NA, index = 1)
}
\arguments{
\item{url}{URL or local file path of an HTML page.}

\item{header}{Logical specifying whether the first row should be used as
column names. If \code{NA}, the first row is used only when it contains \verb{<th>}
elements.}

\item{index}{Index identifying which table to return.}
}
\value{
List of data frames, one for each HTML table.

A single data frame containing the requested HTML table.
}
\description{
Parse an HTML page and return all \verb{<table>} elements as a list of data
frames.
}
\details{
The \code{url} argument may be either a remote URL or a local file path. Tables are
parsed with \code{\link[rvest:html_table]{rvest::html_table()}}. To extract a single table, use
\code{\link[=html_getTable]{html_getTable()}}.
}
\examples{
\dontrun{
url <- "https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"

tables <- html_getTables(url)
firstTable <- tables[[1]]

head(firstTable)
nrow(firstTable)
}

}
