data("dna.obj")
x<-dna.obj[1:6,,as.matrix=FALSE]
# inferring haplotypes from DNA sequences
h<-haplotype(x)
## Grouping haplotypes.
# character vector 'populations' is a grouping factor.
populations<-c("pop1","pop1","pop2","pop3","pop3","pop3")
# length of the argument 'factor' is equal to the number of sequences
g<-grouping(h,factors=populations)
g
Run the code above in your browser using DataLab