Learn R Programming

algebraic.dist (version 0.9.1)

Math.dist: Math group generic for distribution objects.

Description

Handles exp(), log(), sqrt(), abs(), cos(), sin(), etc.

Usage

# S3 method for dist
Math(x, ...)

Value

A simplified distribution or edist

Arguments

x

a dist object

...

additional arguments

Examples

Run this code
# exp(Normal) simplifies to LogNormal
z <- exp(normal(0, 1))
z

# sqrt of a distribution (no closed-form rule, remains edist)
w <- sqrt(exponential(1))
is_edist(w)  # TRUE

Run the code above in your browser using DataLab