Learn R Programming

DEXiR (version 1.0.2)

distr_to_set: distr_to_set

Description

Convert a DEXi value distribution to a DEXi value set.

Usage

distr_to_set(distr, eps = .Machine$double.eps)

Value

A numeric vector determined as which(distr > eps). Notice that distr_to_set

is generally a lossy conversion, so that multiple different distrs are converted to the same sets.

Arguments

distr

An S3 object of class distribution.

eps

A numeric value representing the threshold value of \(p\) (see DEXiR-package) above which the corresponding elements are considered set members.

See Also

DEXiR-package, distribution, set_to_distr()

Examples

Run this code
distr_to_set(distribution(0.2, 0, 0.5, 0.3))
distr_to_set(distribution(0.1, 0, 0.7, 0.2))
distr_to_set(distribution(0.1, 0, 0.7, 0.2), eps = 0.5)

Run the code above in your browser using DataLab