sub-odm-ANY-missing-missing-method: Load a row of an 'odm' object into memory

[,odm,ANY,missing,missing-methodR Documentation

Load a row of an odm object into memory

Description

The operator [ loads a specified row of an odm object into memory. The odm object can be indexed either by integer or feature ID.

Usage

## S4 method for signature 'odm,ANY,missing,missing'
x[i, j, drop]

Arguments

x

an object of class odm

i

the index of the row to load into memory. i can be either an integer (specifying the integer-based index of the row to load into memory) or a string (specifying the feature ID of the row to load into memory).

j

not used

drop

not used

Value

an expression vector (of class numeric)

Examples

library(sceptredata)
directories_to_load <- paste0(
 system.file("extdata", package = "sceptredata"),
 "/highmoi_example/gem_group_", c(1, 2)
)
directory_to_write <- tempdir()
out_list <- create_odm_from_cellranger(
  directories_to_load = directories_to_load,
  directory_to_write = directory_to_write,
)
gene_odm <- out_list$gene
# extract rows into memory by index and ID
v1 <- gene_odm[10L,]
v2 <- gene_odm["ENSG00000173825",]

timothy-barry/ondisc documentation built on April 14, 2024, 1:11 a.m.