Linux环境中的RJSONIO使用https出错
嗨,我在Windows中使用RJSONIO,当我执行以下操作时,它工作正常:Linux环境中的RJSONIO使用https出错,r,rscript,R,Rscript,嗨,我在Windows中使用RJSONIO,当我执行以下操作时,它工作正常: library(RJSONIO) fromJSON("https://issues.apache.org/jira/rest/api/2/project") 它返回一个JSON,但当我在Linux中执行相同的操作时,会出现以下错误: Error in file(con, "r") : cannot open the connection 在谷歌上搜索之后,我注意到我需要提到“file=” fromJSON(
library(RJSONIO)
fromJSON("https://issues.apache.org/jira/rest/api/2/project")
它返回一个JSON,但当我在Linux中执行相同的操作时,会出现以下错误:
Error in file(con, "r") : cannot open the connection
在谷歌上搜索之后,我注意到我需要提到“file=”
fromJSON(文件=”https://issues.apache.org/jira/rest/api/2/project))
现在我得到了一个错误:
unable to find an inherited method for function âfromJSONâ for signature â"missing", "missing"â
任何建议?都在
url
中解释:http://
url的工作方式与任何地方的文件完全相同,
但是https://
url没有
请注意,https://
URL方案不受支持,除非在
窗户。只有在--internet2
或
setInternet2(TRUE)
用于(使用Internet Explorer
仅当证书被认为是
有效。仅使用该选项时,http://user:pass@站点
符号
对于需要身份验证的站点,也可以接受
您可以显式使用RCurl:
fromJSON(RCurl::getURL("https://issues.apache.org/jira/rest/api/2/project"))
您在这两台机器上使用的是什么版本?您可以执行
installed.packages()[“RJSONIO”,“Version”]
来查找。