是否有 R 命令触发从 Rstudio Server 下载文件? [英] Is there an R command to trigger the download of a file from Rstudio Server?

查看:110
本文介绍了是否有 R 命令触发从 Rstudio Server 下载文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Rstudio Server 时,使用 File>More>Export... 从服务器下载文件非常容易,Web 浏览器将自动开始下载.

When working with Rstudio Server, it is very easy to download a file from the server with File>More>Export... The web browser will automatically start downloading.

有没有办法用 R 命令生成这个下载?

Is there a way to generate this download with an R command ?

推荐答案

browseURL 是否为您做到了:

Does browseURL do it for you:

browseURL                package:utils                 R Documentation

Load URL into a WWW Browser

Description:

     Load a given URL into a WWW browser.

Usage:

     browseURL(url, browser = getOption("browser"), encodeIfNeeded = FALSE)

那应该在浏览器中启动它.要直接在 R 中下载,download.file 是您想要的,但这会挂起命令行直到完成.

That should fire it up in a browser. To download directly in R, download.file is what you want, but that hangs the command line until complete.

这篇关于是否有 R 命令触发从 Rstudio Server 下载文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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