as.matrix.bm_bitmap: Coerce bitmap objects to matrix

View source: R/as.matrix.bm_bitmap.R

as.matrix.bm_bitmapR Documentation

Coerce bitmap objects to matrix

Description

as.matrix.bm_bitmap() coerces bm_bitmap() objects to an integer matrix.

Usage

## S3 method for class 'bm_bitmap'
as.matrix(x, ...)

Arguments

x

A bm_bitmap() object

...

Further arguments passed to or from other methods.

Value

An integer matrix

Examples

 space_matrix <- matrix(0L, ncol = 8L, nrow = 8L)
 space_glyph <- bm_bitmap(space_matrix)
 print(space_glyph, px = ".")
 print(as.matrix(space_glyph))

bittermelon documentation built on Feb. 16, 2023, 8:08 p.m.