convertGraph | R Documentation |
Converts graphical file formats (SVG, PNG, JPEG, BMP, GIF, PDF, etc) to one another. The exceptions are the SVG file format that can only be converted to other formats and in contrast, PDF format, which can only be created from others graphical formats. The main purpose of the package was to provide a solution for converting SVG file format to PNG which is often needed for exporting graphical files produced by R widgets.
convertGraph(from, to, size = 1.0, path = NULL)
from |
The graphical source file |
to |
The file name and extension of the converted file |
size |
Enlarge the converted graphical file by magnifying its resolution with the given number |
path |
Path to executable 'phantomJS' binary, downloadble from http://phantomjs.org/download.html |
Converts the given graphical file to the specified file format.
E. F. Haghish
Medical Informatics and Biostatistics (IMBI)
University of Freiburg, Germany
haghish@imbi.uni-freiburg.de
Department of Mathematics and Computer Science
University of Southern Denmark
haghish@imada.sdu.dk
## Not run: #convert SVG to PNG convertGraph("./example.svg", "./example.png", path = "path to executable phantomJS" ) #convert PNG to JPEG convertGraph("./example.png", "./example.jpeg", path = "path to executable phantomJS" ) #convert JPEG to PDF convertGraph("./example.jpeg", "./example.pdf", path = "path to executable phantomJS" ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.