download.file不支持的URL方案中的错误 [英] Error in download.file unsupported URL scheme

查看:580
本文介绍了download.file不支持的URL方案中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一种算法R,该算法R调用一个Web服务,该服务对数据库进行查询并返回JSON对象.

I am working with an algorithm R that calls a webservice that makes a query to a database and returns a JSON object.

url <- "https://example.com?id=1"
json_file <- "C:/xampp/htdocs/example/Download/data.json"
download.file(url, json_file)
document <- fromJSON(json_file)

在我的机器上,当我进入服务器并运行时,该算法通常无法正常工作,出现以下错误:

On my machine the algorithm usually works bad when I go up to the server and run, I get the following error:

Error in download.file(url, json_file) : unsupported URL scheme

URL是https会有问题吗?

here is some problem for the url be https?

推荐答案

来自?download.file的详细信息"部分.

From the Details section of ?download.file.

 Note that 'https://' URLs are only supported if '--internet2' or
 environment variable 'R_WIN_INTERNET2' was set or
 'setInternet2(TRUE)' was used (to make use of Internet Explorer
 internals), and then only if the certificate is considered to be
 valid.

这篇关于download.file不支持的URL方案中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆