当我键入RStudio以下正常工作:阅读URL中R和RStudio
nyt1 <- read.csv(url("http://stat.columbia.edu/~rachel/datasets/nyt1.csv"))
但是当我键入R控制台同样的事情,我得到这个错误:
Error in open.connection(file, "rt") : cannot open the connection
In addition: Warning message:
In open.connection(file, "rt") : cannot open: HTTP status was '0 (nil)'
我已经检查并重新检查了一千次,并且RStudio和R(相同版本等)之间的一切似乎完全相同,那么为什么会出现这种错误?
对于它的价值,它适用于Rgui(Windows 7-64位)。我的猜测是代理设置或网络设置。两种情况下'setInternet2(NA)'的结果是否相同? –
谢谢Brian! setInternet2(NA)在RStudio中为True,在R中为False。你知道我该如何解决这个问题?谢谢! – Sylvia
这可能会有用。 [链接](http://www.r-bloggers.com/friday-function-setinternet2/) –