Reputation:
Is there a way to load (not run) R scripts from URLs? file.edit()
only seems to work for local files. For example the following test file: https://a.uguu.se/wzhzrg_test.R
Upvotes: 0
Views: 1047
Reputation: 78792
rs_url_open <- function(URL) {
tf <- tempfile(fileext=".R")
download.file(URL, tf, quiet=TRUE)
rstudioapi::navigateToFile(tf)
}
rs_url_open("https://a.uguu.se/wzhzrg_test.R")
Upvotes: 3
Reputation: 10352
url.show("https://a.uguu.se/wzhzrg_test.R")
This shows you the code but you do not source the code.
Upvotes: 0