Hi all, I'm trying to scrape the tables in this page - https://www.thegreyhoundrecorder.com.au/results/forbury-park/63442
I've got the page's contents into a variable page from which I extract the required tables using the following code
page %>% rvest::html_nodes(xpath = "//table[@class='raceResultsTable table-striped']") %>% rvest::html_table()
Because that page has no data for Race 2, I;m getting the error -
Error in matrix(NA_character_, nrow = n, ncol = maxp) : invalid 'ncol' value (too large or NA)
Is there any way for me to specify
html_table to skip that?
It works for other pages on the site like https://www.thegreyhoundrecorder.com.au/results/geelong/63461
Any help would be greatly appreciated. Thanks!