Learn R Programming

SeuratObject (version 5.0.2)

droplevels.LogMap: Drop Unused Logical Map Values

Description

Remove any unused values from a logical map

Usage

# S3 method for LogMap
droplevels(x, ...)

Value

x with values not present in any observation removed

Arguments

x

A LogMap object

...

Ignored

See Also

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

Examples

Run this code
map <- LogMap(letters[1:10])
map[['obs']] <- c(1, 3, 7)
map[['entry']] <- c(2, 7, 10)

# Remove unused values
map <- droplevels(map)
map
map[[]]

Run the code above in your browser using DataLab