Hidden Markov Model on R Studio
You can take a look at here. As you can read from there:


  
  Download and unpack hiddenDomains
  
  
  If you haven't already done this, download the latest version of hiddenDomains from the Sourceforge website
  
  Now unpack it


shell$ tar -xzvf hiddenDomains.VERSION.NUMBER.tar.gz



  Where VERSION and NUMBER represent the release that you downloaded.
  
  
  Install R and required R packages (if necessary)
  Download and install R if you don't already have it.
  
  
  If you don't already have them, you will need to install two hidden Markov model libraries:
  
  depmixS4
  HiddenMarkov
  You can do this by starting R on the command line:


shell$ R



  Or, if you prefer RStudio, you can use that.
  
  Regardless of how you started R, type the following commands to install the packages.


&gt; install.packages("depmixS4")
&gt; install.packages("HiddenMarkov")


Here and here may also be helpful for knowing how to use it.