Description Usage Arguments Value Examples

Function used to set new hidden state names to the model. If it is a categorical model, it also sets the labels for the observations. This function verifies that all the parameters and new names agree in size.

1 |

`hmm` |
a list with the necessary variables to define a hidden Markov model. |

`names` |
a list with the new names to be set in the model. |

A `"list"`

that contains the verified hidden Markov model parameters.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
## Values for a hidden Markov model with categorical observations
set.seed(1000)
newModel <- initHMM(2,4)
n <- c("First","Second")
m <- c("A","T","C","G")
newModel <- setNames(newModel,
list( "StateNames" = n,
"ObservationNames" = m) )
## Values for a hidden Markov model with continuous observations
set.seed(1000)
newModel <- initGHMM(3)
n <- c("Low", "Normal", "High" )
newModel <- setNames(newModel,
list( "StateNames" = n))
## Values for a hidden Markov model with discrete observations
set.seed(1000)
newModel <- initPHMM(3)
n <- c("Low", "Normal", "High" )
newModel <- setNames(newModel,
list( "StateNames" = n))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.