嗨,我在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(file=”https://issues.apache.org/jira/rest/api/2/project"“)
所以现在我得到了一个错误:
unable to find an inherited method for function âfromJSONâ for signature â"missing", "missing"â有什么建议吗?
发布于 2014-04-19 12:38:24
这一点在?url中得到了解释:http:// URL的工作方式与所有地方的文件完全一样,但是https:// URL却没有。
请注意,除了在
https://上之外,不支持Windows方案。只有在使用--internet2或setInternet2(TRUE)(使用Internet内部组件)时才支持它,只有在证书被认为是有效的情况下才支持。仅使用该选项,还可以接受需要身份验证的站点的http://user:pass@site标记。
您可以显式地使用RCurl
fromJSON(RCurl::getURL("https://issues.apache.org/jira/rest/api/2/project"))https://stackoverflow.com/questions/23167605
复制相似问题