Learn R Programming

algebraic.dist (version 0.9.1)

rmap.edist: Map function over expression distribution.

Description

Falls back to realize and delegates to rmap.empirical_dist.

Usage

# S3 method for edist
rmap(x, g, ...)

Value

A transformed empirical_dist.

Arguments

x

An edist object.

g

Function to apply to each observation.

...

Additional arguments forwarded to g.

Examples

Run this code
# \donttest{
set.seed(1)
z <- normal(0, 1) * exponential(1)
abs_z <- rmap(z, abs)
mean(abs_z)
# }

Run the code above in your browser using DataLab