library(MazamaCoreUtils)
# Fail gracefully if the resource is not available
try({
# Wikipedia's list of timezones
url <- "http://en.wikipedia.org/wiki/List_of_tz_database_time_zones"
# Extract tables
tables <- html_getTables(url)
# Extract the first table
# NOTE: Analogous to firstTable <- html_getTable(url, index = 1)
firstTable <- tables[[1]]
head(firstTable)
nrow(firstTable)
}, silent = FALSE)
Run the code above in your browser using DataLab