Remove any unused values from a logical map
# S3 method for LogMap
droplevels(x, ...)
A LogMap
object
Ignored
x
with values not present in any
observation removed
Logical map objects, validity, and interaction methods:
LogMap
,
LogMap-validity
,
as.matrix.LogMap()
,
intersect.LogMap()
,
labels.LogMap()
map <- LogMap(letters[1:10])
map[['obs']] <- c(1, 3, 7)
map[['entry']] <- c(2, 7, 10)
# Remove unused values
map <- droplevels(map)
map
#> A logical map for 5 values across 2 observations
map[[]]
#> obs entry
#> a TRUE FALSE
#> b FALSE TRUE
#> c TRUE FALSE
#> g TRUE TRUE
#> j FALSE TRUE