% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis.R
\name{statistics}
\alias{statistics}
\alias{statistics,RegionResult-method}
\title{Lazy pairwise statistics for a RegionResult}
\usage{
statistics(result)

\S4method{statistics}{RegionResult}(result)
}
\arguments{
\item{result}{A [`RegionResult-class`].}
}
\value{
A [`StatisticsResult-class`].
}
\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.
}
\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"]
\donttest{
result <- analyze(load_sample("dataset_real_cancer_drivers_4"))
stats <- statistics(result)
stats@jaccard
stats@hypergeometric
}
}
