Learn R Programming

sejmRP (version 1.3)

safe_readHTMLTable: Safe html table scrapping

Description

Function safe_readHTMLTable tries to download the table from given URL several times.

Usage

safe_readHTMLTable(..., time = 60, attempts = 10)

Arguments

...
arguments that will be passed to readHTMLTable
time
sleep interval after each failure
attempts
max number of tries (if there is a problem with connection)

Value

character vector

Details

Function safe_readHTMLTable performes 10 (by default) attempts to download the URL and waits 60sec (by default) after each failure

Examples

Run this code
## Not run: 
# page <- paste0('http://www.sejm.gov.pl/Sejm7.nsf/',
#                'posiedzenie.xsp?posiedzenie=99&dzien=2')
# safe_readHTMLTable(page)## End(Not run)

Run the code above in your browser using DataLab