Learn R Programming

DEXiR (version 1.0.2)

set_to_distr: set_to_distr

Description

Convert a DEXi value set to DEXi value distribution.

Usage

set_to_distr(set, length = 0)

Value

A distribution object of length length. Arguments that are already distributions are returned "as is". Input vectors of length 0 and other types of objects return NA.

Arguments

set

Normally a numeric vector containing integer numbers.

length

The required length of the resulting distribution vector. The actual length is determined as max(length, max(set)), so the length is extended when too small to hold the whole distribution.

See Also

DEXiR-package, distribution, distr_to_set()

Examples

Run this code
set_to_distr(c(1, 3, 4))
set_to_distr(c(1, 3, 4), length = 5)
set_to_distr(c(1, 3, 4), length = 0)

Run the code above in your browser using DataLab