Learn R Programming

tileHMM (version 1.0-7)

discDist-class: Class "discDist"

Description

Class for discrete probability distributions.

Arguments

Objects from the Class

Objects can be created by calls of the form new("discDist", alpha, prob, dstr). Either alpha and prob or dstr have to be provided. The resulting object represents a discrete probability distribution over alphabet alpha where the probabilities for individual symbols are given by prob.

Slots

alpha:
A character vector containing all symbols of the alphabet.
prob:
Numeric vector of same length as alpha with probabilities for each symbol.
dstr:
A list of the form symbol = probability.

Extends

Class "dist", directly.

Methods

sampleObs
signature(dist = "discDist", size = "numeric"): sample observations from alpha with probability prob.

See Also

contDist, tDist

Examples

Run this code
showClass("discDist")

Run the code above in your browser using DataLab