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
Hi folks,
I have a nexus data matrix with n taxa and m discrete characters (including
some polymorphisms); I would like to know which characters are binary and
which ones are multistate.
Maybe some manual coding will be sufficient but just in case...there is a
function, in your knowledge,