[.bm_bitmap {bittermelon} | R Documentation |
[.bm_bitmap()
is defined so that it returns a bm_bitmap()
object
(if the value is a matrix) and [<-.bm_bitmap()
casts
any replacement values as integers.
## S3 method for class 'bm_bitmap'
x[i, j, ..., drop = TRUE]
## S3 replacement method for class 'bm_bitmap'
x[i, j, ...] <- value
x |
|
i , j |
indices specifying elements to extract or replace.
See [base:: |
... |
Passed to [base:: |
drop |
If |
value |
Replacement value |
[.bm_bitmap()
returns a bm_bitmap()
object if the value is a matrix and/or drop
is FALSE
otherwise it returns an integer matrix.
font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
font <- read_hex(font_file)
capital_r <- font[[str2ucp("R")]]
print(capital_r[4:14,2:8], px = px_ascii)
capital_r[11:13,3:5] <- 2L
print(capital_r, px = px_ascii)