x3p_extract | R Documentation |
If a mask is present, a subset of the surface matrix is extracted based on specified value(s).
x3p_extract(x3p, mask_vals)
x3p |
x3p object |
mask_vals |
vector of mask value(s) |
x3p object
logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
# add a mask
logo <- x3p_add_mask(logo)
mask <- t(logo$surface.matrix==median(logo$surface.matrix))
logo <- x3p_add_mask_layer(logo, mask, color = "red", annotation = "median")
x3p_extract(logo, "#cd7f32")
# x3p_image(logo, size=c(500,500), zoom = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.