cacomp_slot: Access slots in a cacomp object

View source: R/constructor.R

cacomp_slotR Documentation

Access slots in a cacomp object

Description

Access slots in a cacomp object

Usage

cacomp_slot(caobj, slot)

Arguments

caobj

a cacomp object

slot

slot to return

Value

Chosen slot of the cacomp object

Examples

# Simulate scRNAseq data.
cnts <- data.frame(cell_1 = rpois(10, 5),
                   cell_2 = rpois(10, 10),
                   cell_3 = rpois(10, 20))
rownames(cnts) <- paste0("gene_", 1:10)
cnts <- as.matrix(cnts)

# Run correspondence analysis.
ca <- cacomp(obj = cnts, princ_coords = 3, top = 5)

# access left singular vectors
cacomp_slot(ca, "U")


ClemensKohl/APL documentation built on Feb. 6, 2024, 1:28 a.m.