Description Usage Arguments Value Examples
Display an image using a URL or a relative path to an on-disk resource.
1 |
image |
A link or path to an image resource. |
An svg
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | if (interactive()) {
# Place an image (obtained via an image
# link) within a rectangle element using
# the `filter_image()` filter
SVG(width = 500, height = 500) %>%
svg_filter(
id = "image",
filters = list(
filter_image(
image = "https://www.r-project.org/logo/Rlogo.png"
)
)
) %>%
svg_rect(
x = 25, y = 25,
width = "50%", height = "50%",
attrs = svg_attrs_pres(filter = "image")
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.