-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: Couldn't resolve host name #13
Comments
It certainly shouldn't use curl for that operation. |
I found out that I could only read directly from an URL. Even if I download the html from https://en.wikipedia.org/wiki/Demography_of_the_United_Kingdom and read from the local copy I would get the same error message. I should mention that I am using my R on Rstudio server. But I have never experienced this error before. Not even with the XML package. NB. I have never tried htmlParse before, I'll see if it would work. |
Thanks for the tip Christian! I have parsed the html by htmlParse() before passing it to htmltab(). Now that if I run this html file through the codes:
|
So, the problem with this table is that it is not very well constructed. A row tag (tr) that opens in the beginning only closes at the very end, and this makes the job very hard for htmltab. I will be looking into ways to detect and correct such malformedness in the future. For the moment, you can suppress the construction of a header by setting header = 0; that should help a bit. htmltab(parse2, which = 4, header = 0) It still shreds the last column though. Maybe rvest's html_table function does a better job here. |
I had just installed this package, and tried to read a local html file:
However the following error was returned:
'Error in curl::curl_fetch_memory(url, handle = handle) : Couldn't resolve host name'
Not sure why curl is involved or did I missed something?
Thanks!
The text was updated successfully, but these errors were encountered: