labels.LogMap: Find Observations by Value

View source: R/logmap.R

labels.LogMapR Documentation

Find Observations by Value

Description

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

Usage

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

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

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

See Also

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

Examples

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'))


mojaveazure/seurat-object documentation built on Nov. 22, 2024, 11:36 p.m.