Suggestion for ReadMorphNexus
Closed this issue · 3 comments
TGuillerme commented
Hi Graeme,
Just a quick suggestion for allowing ReadMorphNexus
to detect lines that have too many/few characters. You could add the following line 613:
# Little test to check the number of characters on each line is the same as nchar:
wrong.character.number <- which(unlist(lapply(discrete.matrix, length)) != nchar)
if(length(wrong.character.number) > 0) stop(paste("Taxa number", wrong.character.number, "has too many or too few characters.\n"))
This way it will actually print out the lines that have too many/few characters which makes it easier to find the taxa that are messing up the data!
Cheers,
Thomas.
TGuillerme commented
Hi Graeme,
Another suggestion for treating gaps as -
rather than NA
: TGuillerme@9a1cc6b
Cheers,
Thomas.
TGuillerme commented
Hi Graeme,
I've also modified MakeMorphMatrix
and WriteMorphNexus
to deal with inapplicable tokens ("-"
): TGuillerme@c8cee8e
Cheers,
Thomas.
graemetlloyd commented
Thanks Thomas. As you know by now I decided to represent inapplicable states with empty strings ("") so am closing this issue.