二维码

R下载文件cannot open the connection,InternetOpenUrl failed 问题

1288 人阅读 | 时间:2022年05月04日 22:01

Rstudio 下载一个文件出现InternetOpenUrl failed 问题


> source("http://www.statmethods.net/RiA/wmc.txt")

Error in file(filename, "r", encoding = encoding) : 

  cannot open the connection

In addition: Warning message:

In file(filename, "r", encoding = encoding) :

  InternetOpenUrl failed: '安全频道支持出错'


1. 第一种方法,修改options

> options(download.file.method="libcurl", url.method="libcurl")

> source("http://www.statmethods.net/RiA/wmc.txt")

> wmc


成功


第二种解决方式,修改Rstudio的设置

设置Rstudio,Tools > Global Options > Packages, “Use Internet Explorer library/proxy for HTTP”,取消打钩。因为第一种方法已经可以,所以这种方式我没试过。供参考。



©著作权归作者所有:来自ZhiKuGroup博客作者没文化的原创作品,如需转载,请注明出处,否则将追究法律责任 来源:ZhiKuGroup博客,欢迎分享。

评论专区
  • 昵 称必填
  • 邮 箱选填
  • 网 址选填
◎已有 8 人评论
  • 游客  发表于 2个月前
    1楼

    写得实在太好了,我唯一能做的就是默默顶贴!http://t40b.taoyuansj.com

  • 游客  发表于 2个月前
    2楼

    感觉不错!http://p8h3tk.kiukiukids.com

  • 游客  发表于 2个月前
    3楼

    楼主是在找骂么?http://fbhnl.showvs.com

  • 游客  发表于 2个月前
    4楼

    收藏了,很不错的内容!http://www.sh-jiayushiye.com

  • 游客  发表于 2个月前
    5楼

    楼主的文笔不错!http://guyxt.baidacar.cn

  • 游客  发表于 2个月前
    6楼

    我裤子脱了,纸都准备好了,你就给我看这个?http://mobile.tjjixi.com

  • 游客  发表于 2个月前
    7楼

    楼主是在找骂么?http://nu32.mandrake-covi.com

  • 游客  发表于 2个月前
    8楼

    这里的资源非常丰富,帮助我解决了很多问题。http://5nvyc.bachmannchina.com

搜索
作者介绍
30天热门
×
×
本站会员尊享VIP特权,现在就加入我们吧!登录注册×
»
会员登录
新用户注册
×
会员注册
已有账号登录
×