set_to_distr {DEXiR}R Documentation

set_to_distr

Description

Convert a DEXi value set to DEXi value distribution.

Usage

set_to_distr(set, length = 0)

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.

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.

See Also

DEXiR-package, distribution, distr_to_set()

Examples

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)


[Package DEXiR version 1.0.2 Index]