Learn R Programming

⚠️There's a newer version (2.0.4) of this package.Take me there.

httpgd

A graphics device for R that is accessible via network protocols. This package was created to make it easier to embed live R graphics in integrated development environments and other applications. The included HTML/JavaScript client (plot viewer) aims to provide a better overall user experience when dealing with R graphics. The device asynchronously serves graphics via HTTP and WebSockets.

Features

  • Fast plotting
  • Plot resizing and history
  • Interactive plot viewer (client)
  • Platform independent
  • Export to various image formats (SVG, PNG, PDF, EPS, ...)
  • Multiple concurrent clients
  • For developers:
    • Stateless asynchronous HTTP/WebSocket API
    • In-memory access to rendered plots
    • HTML/JavaScript client (TypeScript module)

Demo

Installation

Install httpgd from CRAN:

install.packages("httpgd")

Or get the latest development version from GitHub:

remotes::install_github("nx10/httpgd")

See system requirements for troubleshooting.

Documentation

Contributions welcome!

The various components of httpgd are written in C++, R and TypeScript. We welcome contributions of any kind.

Other areas in need of improvement are testing and documentation.

Links & Articles

About & License

Depends on cpp11, later and systemfonts.

Webserver based on Boost/Beast included in the BH package.

Much of the font handling and SVG rendering code is modified code from the excellent svglite package.

This project is licensed GPL v2.0.

It includes parts of svglite (GPL ≥ 2), Belle (MIT) and fmt (MIT). The HTML client includes Material Design icons by Google which are licensed under the Apache License Version 2.0.

Full copies of the license agreements used by these components are included in ./inst/licenses.

Copy Link

Version

Install

install.packages('httpgd')

Monthly Downloads

3,618

Version

1.3.1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Florian Rupprecht

Last Published

January 30th, 2023

Functions in httpgd (1.3.1)

hgd_test_pattern

Plot a test pattern that can be used to evaluate and compare graphics devices.
hgd_renderers

httpgd device renderers.
hgd_svg

Render httpgd plot to SVG.
httpgd-package

httpgd: HTTP server graphics device
hgd_state

httpgd device status.
hgd_generate_token

Generate random alphanumeric token.
hgd_browse

Open httpgd URL in the browser.
hgd_info

httpgd device information.
hgd_id

Query httpgd plot IDs
hgd_remove

Remove a httpgd plot page.
hgd_clear

Clear all httpgd plot pages.
hgd_inline

Inline SVG rendering.
hgd_plot

Render httpgd plot.
hgd

Asynchronous HTTP server graphics device.
hgd_close

Close httpgd device.
hgd_url

httpgd URL.
hgd_view

Open httpgd URL in the IDE.