Learn R Programming

httpgd (version 1.3.1)

hgd_browse: Open httpgd URL in the browser.

Description

This function will only work after starting a device with hgd().

Usage

hgd_browse(..., which = dev.cur(), browser = getOption("browser"))

Value

URL.

Arguments

...

Parameters passed to hgd_url().

which

Which device (ID).

browser

Program to be used as HTML browser.

Examples

Run this code
if (interactive()) {
  hgd() # Initialize graphics device and start server
  hgd_browse() # Or copy the displayed link in the browser

  # Plot something
  x <- seq(0, 3 * pi, by = 0.1)
  plot(x, sin(x), type = "l")

  dev.off() # alternatively: hgd_close()
}

Run the code above in your browser using DataLab