fun <- function (file)
{
set.sys.path(file, Function = "fun")
`.this.path::document.context`
}
fun()
fun("clipboard")
fun(paste0("https://raw.githubusercontent.com/ArcadeAntics/",
"this.path/main/tests/sys-path-with-urls.R"))
FILE.R <- tempfile(fileext = ".R"); file.create(FILE.R)
x <- fun(FILE.R)
print(x)
print(x, quote = FALSE)
format(x)
as.character(x)
unlink(FILE.R)
Run the code above in your browser using DataLab