I'm just trying to import a html table into R. I have tried other people's mistakes and looked extensively at the solutions given, though my problems still arise. I understand this is easy, however for some reason it just isn't working for me. I get the following errors:
Error: failed to load external entity "http://www.formula1.com/en/results.html/2020/races/1045/austria/race-result.html" (for the first function)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘readHTMLTable’ for signature ‘"NULL"’ (for the second)
As I have mentioned, I have looked at other people's problems and tried solving mine using their solutions, though the same problems still arise. Perhaps this could be due to my settings(I'm not sure), however can anyone help me please?
library(XML)
library(rjson)
library(RCurl)
library(htmltools)
url<- "http://www.formula1.com/en/results.html/2020/races/1045/austria/race-result.html"
austria = readHTMLTable(url, which=1)
tabs <- getURL("http://www.formula1.com/en/results.html/2020/races/1045/austria/race-result.html")
tabs1 <- readHTMLTable(tabs, which=1)