Learn R Programming

discreteRV (version 1.2.2)

margins: Marginal distributions of a joint random variable

Description

Extracts the marginal probability mass functions from a joint distribution.

Usage

margins(X, sep = ",")

Arguments

X
a random variable
sep
parameter specifying the separator between dimensions, defaults to ","

Examples

Run this code
X <- RV(1:6, 1/6)
X3 <- iid(X, 3)
margins(X3)

Run the code above in your browser using DataLab