bm_clamp | R Documentation |
bm_clamp()
“clamps” bitmap integers that lie outside an interval.
The default coerces a multiple-integer-valued bitmap
into a binary bitmap (as expected by most bitmap font formats).
bm_clamp(bm_object, lower = 0L, upper = 1L, value = upper)
bm_object |
Either a |
lower |
Integer value. Any value below |
upper |
Integer value. Any value above |
value |
Integer vector of length one or two of replacement value(s).
If |
Either a bm_bitmap()
, bm_list()
, or bm_font()
object.
plus_sign <- matrix(0L, nrow = 9L, ncol = 9L) plus_sign[5L, 3:7] <- 2L plus_sign[3:7, 5L] <- 2L plus_sign_glyph <- bm_bitmap(plus_sign) print(plus_sign_glyph, px = c(".", "#", "@")) plus_sign_clamped <- bm_clamp(plus_sign_glyph) print(plus_sign_clamped, px = c(".", "#", "@"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.