You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Unix环境Posit Workbench中程序化下载文件至Windows本地机器的报错排查求助

Unix环境Posit Workbench中程序化下载文件至Windows本地机器的报错排查求助

大家好,我现在碰到了一个棘手的问题想请教各位:我在Chrome浏览器里使用运行在Unix服务器上的Posit Workbench,想要通过R代码程序化地把服务器上的一个.tex文件下载到本地Windows电脑,但尝试的代码一直报错,具体细节如下:

我写的代码是这样的:

# File on Unix server
unix_file <- "/users/tables_figures/file.tex"
url <- paste("file://", unix_file, sep="")

# Destination on local Windows machine
local_file <- "C:/Users/myname/tables_figures/file.tex"

# Download the file
download.file(unix_file, destfile = local_file, mode = "w", method = "auto")

运行之后出现了下面的错误和警告:

trying URL '/users/tables_figures/file.tex'
Error in download.file(unix_file, destfile = local_file, mode = "w", method = "auto") : 
  cannot open URL '/users/tables_figures/file.tex'

In addition: Warning message:
In download.file(unix_file, destfile = local_file, mode = "w", method = "auto") :
  URL '/users/tables_figures/file.tex': status was 'URL using bad/illegal format or missing URL'

有没有大佬能帮我看看问题出在哪儿,应该怎么修改才能成功把服务器上的文件下载到本地Windows机器呢?

备注:内容来源于stack exchange,提问作者Grillo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 10:39:29