Method for obtaining the marginal distribution of empirical_dist object x.

# 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
#> [1] 2