resize | R Documentation |
This does not change size of the image in pixels, nor does it affect appearance – it is lossless compression. This requires GraphicsMagick (recommended) or ImageMagick to be installed.
resize(filename, geometry)
filename |
Character vector containing the path of images to resize. |
geometry |
Scaling specification. Can be a percent, as in |
if (interactive()) {
# Can be chained with webshot() or appshot()
webshot("https://www.r-project.org/", "r-small-1.png") %>%
resize("75%")
# Generate image that is 400 pixels wide
webshot("https://www.r-project.org/", "r-small-2.png") %>%
resize("400x")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.