statistics: Lazy pairwise statistics for a RegionResult

statisticsR Documentation

Lazy pairwise statistics for a RegionResult

Description

Computes (and on subsequent calls re-computes) the ['StatisticsResult-class'] for the pairwise metric tables. R has no built-in 'cached_property' equivalent for S4 slots, so this is recomputed each call. Cache externally via 'stats <- statistics(result)' if you need to access it many times.

Usage

statistics(result)

## S4 method for signature 'RegionResult'
statistics(result)

Arguments

result

A ['RegionResult-class'].

Value

A ['StatisticsResult-class'].

Examples

ds <- methods::new("VennDataset",
    set_names = c("A", "B"),
    items = list(A = c("x", "y"), B = c("y", "z")),
    item_order = c("x", "y", "z"),
    universe_size = 10L, source_path = NULL, format = "csv")
result <- analyze(ds)
stats <- statistics(result)
stats@jaccard["A", "B"]

result <- analyze(load_sample("dataset_real_cancer_drivers_4"))
stats <- statistics(result)
stats@jaccard
stats@hypergeometric


vennDiagramLab documentation built on May 19, 2026, 1:07 a.m.