Hi folks,
I want to thanks all people who responded to my post; I'm testing the proposed
codes and I'll let you know their efficiency
the problem, apparently seems the managing of polimorphisms in the data matrix
(i.e. [0,2] for the same character for a given taxon)
all the best
paolo
I don't know if this has already been answered, but read.nexus.data in
ape automatically creates a list character vectors. To get the number of
states in each character you can do:
N-apply(data.frame(X),1,function(x) length(unique(x)))
if your data is an object of class DNAbin then the