Open DSHerzberg opened 5 years ago
The main constraint, for security reasons, is that RStudio's Viewer will only open files below the session temp directory.
But maybe @kevinushey can weigh in to correct or refine this.
That is indeed correct.
Does this mean that it can't be done?
You can do it, but you need to copy the file(s) into tempdir()
and then open them from there with the function returned by getOption("viewer")
.
Is there a way to do this without rendering a
.rmd
? I found this code but couldn't figure out how to apply it:tempDir <- tempfile()
dir.create(tempDir)
htmlFile <- file.path(tempDir, "index.html")
# (code to write some content to the file)
viewer <- getOption("viewer")
viewer(htmlFile)