## Not run: ------------------------------------
#
# # run an application inside the IDE
# rstudioapi::viewer("http://localhost:8100")
#
# # run an application and request a height of 500 pixels
# rstudioapi::viewer("http://localhost:8100", height = 500)
#
# # probe for viewer option then fall back to browseURL
# viewer <- getOption("viewer")
# if (!is.null(viewer))
# viewer("http://localhost:8100")
# else
# utils::browseURL("http://localhost:8100")
#
# # generate a temporary html file and display it
# dir <- tempfile()
# dir.create(dir)
# htmlFile <- file.path(dir, "index.html")
# # (code to write some content to the file)
# rstudioapi::viewer(htmlFile)
## ---------------------------------------------
Run the code above in your browser using DataLab