ncol()
and nrow()
return the number of rows (i.e., features) and columns (i.e., cells), respectively, contained within an odm
object. dim()
returns an integer vector of length two whose first and second entries, respectively, indicate the number of rows and columns in an odm
object.
Usage
# S4 method for odm
dim(x)
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,
)
#> Round 1/2 processing of the input files.
#> Processing file 1 of 2.
#> Processing file 2 of 2.
#> Round 2/2 processing of the input files.
#> Processing file 1 of 2. Computing cellwise covariates. Writing to disk.
#> Processing file 2 of 2. Computing cellwise covariates. Writing to disk.
gene_odm <- out_list$gene
# return the dimension, number of rows, and number of columns
dim(gene_odm)
#> [1] 526 45919
nrow(gene_odm)
#> [1] 526
ncol(gene_odm)
#> [1] 45919