【发布时间】:2013-06-11 13:18:21
【问题描述】:
我正在使用以下代码:
url = "http://finance.yahoo.com/q/op?s=DIA&m=2013-07"
library(XML)
tabs = readHTMLTable(url, stringsAsFactors = F)
我收到以下错误:
Error: failed to load external entity "http://finance.yahoo.com/q/op?s=DIA&m=2013-07"
当我在浏览器中使用 url 时,它工作正常。那么,我在这里做错了什么?
谢谢
【问题讨论】:
-
你的代码适合我。
-
它也适用于我。基于stackoverflow.com/questions/14629026/…,听起来这可能是您的互联网连接问题。您可以在浏览器中加载页面吗?
-
是的,我可以在浏览器中正常加载页面。所以,我认为我的互联网连接很好。
-
你能在不触发错误的情况下运行
library(RCurl); tabs = getURL(url)吗? -
代理设置试试这里的方法stackoverflow.com/questions/6467277/proxy-setting-for-r,可以帮到你
标签: r