`simnucleotide` <-
function(nucleotide, brlens, qmatrix)
{
tranprob<-expm(Matrix(qmatrix*brlens))
new<-tranprob[nucleotide,]
newnucleotide<-apply(new,1,function(x) sample(1:4,1,TRUE,x))
newnucleotide
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.