Examples for 'rstudioapi::viewer'


View local web content within RStudio

Aliases: viewer

Keywords:

### ** Examples


## Not run: 
##D 
##D # run an application inside the IDE
##D rstudioapi::viewer("http://localhost:8100")
##D 
##D # run an application and request a height of 500 pixels
##D rstudioapi::viewer("http://localhost:8100", height = 500)
##D 
##D # use 'viewer' option if set, or `utils::browseURL()` if unset
##D viewer <- getOption("viewer", default = utils::browseURL)
##D viewer("http://localhost:8100")
##D 
##D # generate a temporary html file and display it
##D dir <- tempfile()
##D dir.create(dir)
##D htmlFile <- file.path(dir, "index.html")
##D # (code to write some content to the file)
##D rstudioapi::viewer(htmlFile)
##D 
## End(Not run)

[Package rstudioapi version 0.13 Index]