Skip to content

add sth re: using in RStudio #1

@ajschumacher

Description

@ajschumacher

see:
https://support.rstudio.com/hc/en-us/articles/202133558-Extending-RStudio-with-the-Viewer-Pane

to know if currently in viewer pane, use this thing:

http://localhost:8100?viewer_pane=1

best:

viewer <- getOption("viewer")
if (!is.null(viewer))
  viewer("http://localhost:8100")
else
  utils::browseURL("http://localhost:8100")
rstudio::viewer("http://localhost:8100")

or

tempDir <- tempfile()
dir.create(tempDir)
htmlFile <- file.path(tempDir, "index.html")
# (code to write some content to the file)
rstudio::viewer(htmlFile)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions