Learn R Programming

VLMC (version 1.4-4)

id2ctxt: VLMC Context ID Conversion

Description

Utility for converting a vlmc state ID to the corresponding context. Of rare interest to the average user.

Usage

id2ctxt(id, m=nchar(alpha), alpha=NULL)

Value

a list (if alpha is not specified) or character vector of the same length as id, giving the context (as integer vector or single string) of the corresponding id

Arguments

id

integer, a context ID such as optionally returned by predict.vlmc.

m

integer, the alphabet length. Defaults to nchar(alpha), the alphabet size if that is given.

alpha

alphabet string

See Also

predict.vlmc(*, type = "ID").

Examples

Run this code
    id2ctxt(c(2,3,5,9), alpha = "Ab")
str(id2ctxt(c(2,3,5,9), 2))

Run the code above in your browser using DataLab