The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
rvg
is providing two graphics devices that produces
Vector Graphics outputs in DrawingML format 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
dml
and ph_with()
have to be used with package
officer
to add vector graphics in PowerPoint documents
(dml
function is a simple wrapper to mark the plot
instructions as Vector Graphics instructions).
library(rvg)
library(ggplot2)
library(officer)
<- dml(code = barplot(1:5, col = 2:6))
my_vec_graph
<- read_pptx()
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with(doc, my_vec_graph, location = ph_location_fullsize() )
doc print(doc, target = "my_plot.pptx")
Function xl_add_vg()
is the equivalent for Excel
workbooks.
<- read_xlsx()
doc <- xl_add_vg(doc, sheet = "Feuil1", code = print(gg),
doc 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
.
You can get the development version from GitHub:
::install_github("davidgohel/rvg") devtools
Install the CRAN version:
install.packages("rvg")
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.