check_cacomp: Check if cacomp object was correctly created.

View source: R/constructor.R

check_cacompR Documentation

Check if cacomp object was correctly created.

Description

Checks if the slots in a cacomp object are of the correct size and whether they are coherent.

Usage

check_cacomp(object)

Arguments

object

A cacomp object.

Value

TRUE if it is a valid cacomp object. FALSE otherwise.

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)

check_cacomp(ca)

VingronLab/APL documentation built on Nov. 9, 2024, 5:33 p.m.