table_scrap: HTML table scraping

Description Usage Arguments Value Examples

View source: R/table_scrap.R

Description

This function is used to scrape an html table from a website.

Usage

1
table_scrap(link, choose = 1, header = TRUE, fill = FALSE, askRobot = FALSE)

Arguments

link

the link of the web page containing the table to scrape

choose

an integer indicating which table to scrape

header

do you want the first line to be the leader (default to TRUE)

fill

logical. Should be set to TRUE when the table has an inconsistent number of columns.

askRobot

logical. Should the function ask the robots.txt if we're allowed or not to scrape the web page ? Default is FALSE.

Value

a data frame object.

Examples

1
2
3
4
# Extracting premier ligue 2019/2020 top scorers

link     <- "https://www.topscorersfootball.com/premier-league"
table_scrap(link)

ralger documentation built on March 18, 2021, 1:06 a.m.