Learn R Programming

algebraic.dist (version 0.9.1)

marginal.empirical_dist: 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 empirical_dist
marginal(x, indices)

Value

An empirical_dist over the selected columns.

Arguments

x

The empirical distribution object.

indices

The indices of the marginal distribution to obtain.

Examples

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

Run the code above in your browser using DataLab