marginal.empirical_dist: Method for obtaining the marginal distribution of...

View source: R/empirical_dist.R

marginal.empirical_distR Documentation

Method for obtaining the marginal distribution of empirical_dist object x.

Description

Method for obtaining the marginal distribution of empirical_dist object x.

Usage

## S3 method for class 'empirical_dist'
marginal(x, indices)

Arguments

x

The empirical distribution object.

indices

The indices of the marginal distribution to obtain.

Value

An empirical_dist over the selected columns.

Examples

mat <- matrix(1:12, ncol = 3)
ed <- empirical_dist(mat)
ed_marginal <- marginal(ed, c(1, 3))
dim(ed_marginal) # 2

algebraic.dist documentation built on Feb. 27, 2026, 5:06 p.m.