sub-LogMap-method: Matrix-like Subsetting for Logical Maps

[,LogMapR Documentation

Matrix-like Subsetting for Logical Maps

Description

Matrix-like Subsetting for Logical Maps

Usage

## S4 method for signature 'LogMap,missing,missing,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'LogMap,character,character,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'LogMap,character,missing,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'LogMap,missing,character,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'LogMap,numeric,missing,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'LogMap,missing,numeric,ANY'
x[i, j, ..., drop = FALSE]

## S4 method for signature 'LogMap,numeric,numeric,ANY'
x[i, j, ..., drop = FALSE]

Arguments

x

A LogMap object

i, j

Vectors of values (i) and observations (j) to pull from x

...

Arguments passed to other methods

drop

relevant for matrices and arrays. If TRUE the result is coerced to the lowest possible dimension (see the examples). This only works for extracting elements, not for the replacement. See drop for further details.

Note

i is not reordable; passing a different order for i will return a subset with rows in the same order as x

Examples

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

map[]
map[1:5, 2L]
map[c("b", "c", "f"), "obs"]

# Pass `drop = TRUE` to cast to `matrix`
map[1:3, , drop = TRUE]

# Note that `i` is non-reordable
rownames(map)[1:3]
map[c("b", "c", "a"), , drop = TRUE]


SeuratObject documentation built on May 29, 2024, 12:31 p.m.