Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

convert

Converting between graphical formats


Description

Wrapper function for converting graphics with ImageMagick

Usage

convert.g(path = NULL, fileroot= "*", from = "pdf",
    to = "png", create.path = TRUE, options = NULL)

Arguments

path

String: The path to the from graphic files.

fileroot

String: Graphic root name; default is "*" for all files with the from extension.

from

File type extension specifying the from format.

to

File type extension specifying the to format.

create.path

Logical: Should the output files be placed in a to subfolder.

options

Additional options to be passed to the ImageMagick mogrify function

Details

Conversion is done through a call to ImageMagick mogrify function. This means that ImageMagick should be installed on your system. It must also be listed in the path.

for some values such as "pdf" and "eps" of the from or to arguments ImageMagick works in conjunction with Gostscript. The latter should, therefore, also be accessible.

See Also

Examples

## Not run: 
## Convert all .pdf graphics in the "figSW" directory
## into .png files and put the files in a "png" subfolder.
convert.g(path="figSW", from="pdf", to="png")

## Same, but convert to .jpg files.
convert.g(path="figSW", to="jpg")

## convert file "example.eps" in current path to ".pdf"
## and put it in same folder.
convert.g(fileroot = "example", create.folder=FALSE)

## End(Not run)

TraMineRextras

TraMineR Extension

v0.6.1
GPL (>= 2)
Authors
Gilbert Ritschard [aut, cre, ths, cph] (<https://orcid.org/0000-0001-7776-0903>), Matthias Studer [aut] (<https://orcid.org/0000-0002-6269-1412>), Reto Buergin [aut], Tim Liao [ctb], Alexis Gabadinho [ctb], Pierre-Alexandre Fonta [ctb], Nicolas Muller [ctb], Patrick Rousset [ctb]
Initial release
2021-01-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.