Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R:source()无法打开连接,状态为';不能';t解析主机名';_R_Curl_Ubuntu 18.04 - Fatal编程技术网

R:source()无法打开连接,状态为';不能';t解析主机名';

R:source()无法打开连接,状态为';不能';t解析主机名';,r,curl,ubuntu-18.04,R,Curl,Ubuntu 18.04,我试图从我的github repo中获取一个脚本,其中包含我经常使用的函数。 所以我在脚本的开头有一行: source("https://github.com/jogaudard/common/blob/master/fun-fluxes.R") 在RStudio中返回(与终端中的R相同) 我尝试了其他脚本。任何在线的东西都会出现同样的错误source()可以很好地处理本地(同一目录或其他地方)中的脚本 这是因为我安装了一个软件包,该软件包有点乱了curl。所以我想这可能就

我试图从我的github repo中获取一个脚本,其中包含我经常使用的函数。 所以我在脚本的开头有一行:

source("https://github.com/jogaudard/common/blob/master/fun-fluxes.R")
在RStudio中返回(与终端中的R相同)

我尝试了其他脚本。任何在线的东西都会出现同样的错误
source()
可以很好地处理本地(同一目录或其他地方)中的脚本

这是因为我安装了一个软件包,该软件包有点乱了
curl
。所以我想这可能就是问题所在。但是当我在另一台计算机上尝试时,我得到了同样的错误

这两台计算机在Ubuntu 18.04.5 LTS上都有R版本3.6.3


我真的迷路了。在任何地方都找不到任何类似的问题。

您正在寻找一个带有html标记的文件,R认为该标记(正确)是语法错误。使用
源代码(“https://raw.githubusercontent.com/jogaudard/common/master/fun-fluxes.R“”
以获取“原始”文件的源


你和在线R服务的问题是一个转移视线的问题。如果您需要有人调查,您应该提供该服务的URL。

谢谢!真管用!但为什么它以前能工作,现在不能了?(只是想了解一下)我通常不会使用在线R编辑器,只是想看看我是否收到了同样的问题。
Error in source("https://github.com/jogaudard/common/blob/master/fun-fluxes.R") : 
https://github.com/jogaudard/common/blob/master/fun-fluxes.R:6:1: unexpected '<'
5: 
6: <
   ^
Error in file(filename, "r", encoding = encoding) : 
cannot open the connection to 'https://github.com/jogaudard/common/blob/master/fun-fluxes.R'
Calls: source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
URL 'https://github.com/jogaudard/common/blob/master/fun-fluxes.R': status was 'Couldn't resolve host name'
Execution halted