dim.DimReduc: Dimensional Reduction Meta-Information

View source: R/dimreduc.R

dim.DimReducR Documentation

Dimensional Reduction Meta-Information

Description

Pull meta-information about cells and dimensions for a given dimensional reduction; cell meta-information is stored as row meta-information (eg. nrow, rownames) and dimension meta-information is stored as column meta-information (eg. ncol, colnames)

Usage

## S3 method for class 'DimReduc'
dim(x)

## S3 method for class 'DimReduc'
dimnames(x)

## S3 method for class 'DimReduc'
length(x)

## S3 method for class 'DimReduc'
names(x)

Arguments

x

A DimReduc object

Value

dim: The number of cells (nrow) and dimensions (ncol)

dimnames: The cell (row) and dimension (column) names

length: The number of dimensions

names: The dimension identifiers

See Also

Cells

Dimensional reduction object, validity, and interaction methods CreateDimReducObject(), DimReduc-class, DimReduc-validity, [.DimReduc(), [[.DimReduc(), merge.DimReduc(), print.DimReduc(), subset.DimReduc()

Examples

pca <- pbmc_small[["pca"]]
pca
dim(pca)

# nrow is number of cells
nrow(pca)

# rownames pulls cell names
head(rownames(pca))

# ncol and length are number of dimensions
ncol(pca)
length(pca)

# colnames and names pull dimension identifiers
head(colnames(pca))
head(names(pca))


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