No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 2910c8b Aug 27, 2018
Failed to load latest commit information.
R Deprecate dml_docx Jun 10, 2018
inst/templates adapt to officer Feb 15, 2017
man Deprecate dml_docx Jun 10, 2018
src minors Apr 19, 2018
tests oops Feb 7, 2018
.Rbuildignore prepare cran submit Oct 4, 2017
.gitattributes minor [ci skip] Aug 27, 2018
.gitignore pach for officer 0.1.8 change Oct 4, 2017
.travis.yml travis Dec 3, 2017
DESCRIPTION minor [ci skip] Jun 10, 2018
NAMESPACE cran version Dec 3, 2017
NEWS Deprecate dml_docx Jun 10, 2018
README.Rmd cran version Dec 3, 2017 cran version Dec 3, 2017
appveyor.yml travis Nov 7, 2015
cleanup add gdtools Sep 9, 2015 prepare for cran [ci skip] Jun 10, 2018
rvg.Rproj pref [ci skip] Sep 2, 2017

rvg package

Travis-CI Build Status Build status version cranlogs Active

rvg is a set of graphics devices that produces Vector Graphics outputs. This package is providing:

  • SVG (Scalable Vector Graphics) with dsvg. The graphic can be made interactive (tooltip, onclick and id attribute manipulation). To make that work in an HTML document, check for dependencies d3.js in the document. This is the svg device used by package ggiraph.
  • DrawingML for Microsoft PowerPoint with dml_pptx and for Microsoft Excel with dml_xlsx. Theses formats let users edit the graphic elements (editable graphics) within PowerPoint or Excel and have a very good rendering.

These raw XML outputs cannot be used as is. Functions ph_with_vg() and ph_with_vg_at() can be used with package officer to add vector graphics in PowerPoint documents.


doc <- read_pptx()
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with_vg(doc, code = barplot(1:10), type = "body")
print(doc, target = "my_plot.pptx")

Function xl_add_vg() is the equivalent for Excel workbooks.

doc <- read_xlsx()
doc <- xl_add_vg(doc, sheet = "Feuil1", code = print(gg), 
  width = 6, height = 6, left = 1, top = 2 )
print(doc, target = "vg.xlsx")

By default, theses graphics are editable, element edition can be disabled with option editable = FALSE. For more details, read officer article graphics.


You can get the development version from GitHub:


Install the CRAN version: