## load tree
data(mammal.tree)
## rescale edge lengths
mammal.tree$edge.length<-mammal.tree$edge.length/
max(nodeHeights(mammal.tree))*0.2
## simulate gamma rate heterogeneity
gg<-rgamma(n=100,shape=0.25,rate=0.25)
## simulate DNA sequences with rate heterogeneity
dna<-genSeq(mammal.tree,l=100,rate=gg)
Run the code above in your browser using DataLab