문제

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.

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

도움이 되었습니까?

해결책

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)

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top