Coerce a logical map to a matrix; this removes all logical map class capabilities from the object and returns a base-R matrix object

# S3 method for LogMap
as.matrix(x, ...)

Arguments

x

A LogMap object

...

Ignored

Value

A base-R matrix created from x

See also

Logical map objects, validity, and interaction methods: LogMap, LogMap-validity, droplevels.LogMap(), intersect.LogMap(), labels.LogMap()

Examples

map <- LogMap(letters[1:10])
map[['obs']] <- c(1, 3, 7)
mat <- as.matrix(map)
mat
#>     obs
#> a  TRUE
#> b FALSE
#> c  TRUE
#> d FALSE
#> e FALSE
#> f FALSE
#> g  TRUE
#> h FALSE
#> i FALSE
#> j FALSE
class(mat)
#> [1] "matrix" "array"