RStudio - display html content in view pane
I would like to display the html content stored in my working directory in the RStudio view pane. I read this post and thought it should be possible.
However, local files are always displayed in an external browser. Is there something I can't see?
# This will render in Viewer pane
tempDir <- tempfile()
dir.create(tempDir)
htmlFile <- file.path(tempDir, "test.html")
writeLines('<html><body>Hi there</body></html>', htmlFile)
rstudio::viewer(htmlFile)
# This will render in external browser
writeLines('<html><body>Hi there</body></html>', 'test.html')
rstudio::viewer('test.html')
+3
source to share
No one has answered this question yet
Check out similar questions: