Pull cell embeddings from a dimensional reduction

# S3 method for DimReduc
[[(x, i, j, drop = FALSE, ...)

Arguments

x

A DimReduc object

i

Cell names or indices

j

Dimension identifiers or indices

drop

Coerce the result to the lowest possible dimension; see drop for further details

...

Arguments passed to other methods

Value

Cell embeddings for cells i and dimensions j

See also

Embeddings

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

Examples

pca <- pbmc_small[["pca"]]
pca[[1:10, 1:5]]
#>                       PC_1       PC_2       PC_3      PC_4       PC_5
#> ATGCCAGAACGACT -0.77403708 -0.8996461 -0.2493078 0.5585948  0.4650838
#> CATGGCCTGTGCAT -0.02602702 -0.3466795  0.6651668 0.4182900  0.5853204
#> GAACCTGATGAACC -0.45650250  0.1795811  1.3175907 2.0137210 -0.4818851
#> TGACTGGATTCTCA -0.81163243 -1.3795340 -1.0019320 0.1390503 -1.5982232
#> AGTCAGACTGCACA -0.77403708 -0.8996461 -0.2493078 0.5585948  0.4650838
#> TCTGATACACGTGT -0.77403708 -0.8996461 -0.2493078 0.5585948  0.4650838
#> TGGTATCTAAACAG -0.46034009 -1.1872843 -0.3117314 0.7159635 -1.6519785
#> GCAGCTCTGTTTCT -0.90033933 -0.3880251  0.6931944 0.4042163  0.5356764
#> GATATAACACGCAT -0.77403708 -0.8996461 -0.2493078 0.5585948  0.4650838
#> AATGTTGACAGTCA -0.48779823 -1.1621071 -0.3062674 0.7021889 -1.4666704