save_phylopic {rphylopic} | R Documentation |
Save a PhyloPic image
Description
save_phylopic
is a convenient function for saving a PhyloPic silhouette
fetched via get_phylopic
. Available formats for
saving are those available in the grDevices package (i.e. pdf, png, svg,
tiff, jpeg, and bmp).
Usage
save_phylopic(img = NULL, path = NULL, bg = "transparent", ...)
Arguments
img |
|
path |
|
bg |
|
... |
Additional arguments available for the called grDevices
function. The called function is determined by the file extension used in
|
Details
This function can be used to save a PhyloPic image obtained via
the get_phylopic
or any object of class
Picture
from the grImport2 package. Any file format available in the
grDevices package can be used (i.e. pdf, png, svg, tiff, jpeg, and
bmp).
Value
An image is saved. Nothing is returned to the R interface.
Examples
## Not run:
# Get image data
img <- get_phylopic("27356f15-3cf8-47e8-ab41-71c6260b2724")
# Save file
save_phylopic(img = img, path = "./phylopic.png",
width = 500, height = 500)
## End(Not run)