从 R 中的网站读取 .dat 文件时出错
Error when reading in a .dat file from a website in R
我在 R 中遇到从网站读入 .dat 文件的问题。我知道类似的 post 已经 posted,但是关于代理设置的答案对我没有帮助,因此相邻地分享我的代码和错误:
data.2 <- read.table(file="http://stat.ethz.ch/Teaching/Datasets/WBL/cbe.dat")
Error in file(file, "rt") : cannot open the connection to
'http://stat.ethz.ch/Teaching/Datasets/WBL/cbe.dat' In addition:
Warning message: In file(file, "rt") : URL
'https://stat.ethz.ch/Teaching/Datasets/WBL/cbe.dat': status was
'Couldn't resolve proxy name'
class 的一些人能够毫无问题地将它插入到 R 中。
您正坐在防火墙后面,不安全 HTTP 流量的默认端口 (80) 被阻止。请联系您的 IT 管理员或使用其他互联网连接。
但是,ethz.ch
也提供内部 https 服务:
read.table(file="https://stat.ethz.ch/Teaching/Datasets/WBL/cbe.dat")
实际上我现在只是简单地下载.dat文件并保存到本地就解决了。
我在 R 中遇到从网站读入 .dat 文件的问题。我知道类似的 post 已经 posted,但是关于代理设置的答案对我没有帮助,因此相邻地分享我的代码和错误:
data.2 <- read.table(file="http://stat.ethz.ch/Teaching/Datasets/WBL/cbe.dat")
Error in file(file, "rt") : cannot open the connection to 'http://stat.ethz.ch/Teaching/Datasets/WBL/cbe.dat' In addition: Warning message: In file(file, "rt") : URL 'https://stat.ethz.ch/Teaching/Datasets/WBL/cbe.dat': status was 'Couldn't resolve proxy name'
class 的一些人能够毫无问题地将它插入到 R 中。
您正坐在防火墙后面,不安全 HTTP 流量的默认端口 (80) 被阻止。请联系您的 IT 管理员或使用其他互联网连接。
但是,ethz.ch
也提供内部 https 服务:
read.table(file="https://stat.ethz.ch/Teaching/Datasets/WBL/cbe.dat")
实际上我现在只是简单地下载.dat文件并保存到本地就解决了。