nucleotideDiversity(x, bases = c("a", "c", "g", "t"), simplify = TRUE)
TRUE
and only one loci exists, return a vector,
otherwise, a list of vectors with one element per locus will be returned.data(dolph.strata)
data(dolph.seqs)
strata <- dolph.strata$fine
names(strata) <- dolph.strata$ids
dloop <- sequence2gtypes(dolph.seqs, strata, seq.names = "dLoop")
nucleotideDiversity(dloop)
Run the code above in your browser using DataLab