Learn R Programming

SeuratObject (version 5.0.2)

labels.LogMap: Find Observations by Value

Description

Identify the observations that contain a specific value in a logical map

Usage

# S3 method for LogMap
labels(
  object,
  values,
  select = c("first", "last", "common", "all"),
  simplify = TRUE,
  ...
)

Value

labels: A list, or vector if simplify is TRUE, of all values and the observations they're found in, according to the value of select

Arguments

object

A LogMap object

values

A vector of values to find observations for

select

Observation selection method; choose from:

  • first”: the first observation the value is found in

  • last”: the last observation the value is found in

  • common”: the first most-common observation the value is found in; most-common is determined by the observation that contains the most of the values requested

  • all”: all observations the value is found in

simplify

Simplify the resulting list to a vector

...

Ignored

See Also

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

Examples

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

# Find observations for a set of values
labels(map, c('a', 'b', 'g'))

Run the code above in your browser using DataLab