readNexusMorph: Reads morphological character data In NEXUS Format

Description Usage Arguments Details Value Author(s)

View source: R/readNexusMorph.R


This function reads a file with character scoring in the NEXUS format and provides a properly formatted data set to input into the lewisMkv function.





a file name specified by either a variable of mode character, or a double-quoted string


This parser is really just a hacked version of “” that is provided by ape. I rewrote parts to deal with completely and incompletely ambiguous characters, gaps, and so that the format of the data fits perfectly into lewisMkv. As with “” this parser reads data from a file written in a restricted NEXUS format. I've posted on my website ( an example NEXUS file properly formatted that will work with this function. But there is one major change worth mentioning here:


A data.frame of character scorings across sites for a set of species. Gaps and completely missing characters are coded as “?”, and “&” separate scorings of partially ambiguous characters. Will work as a direct input for “lewisMkv”.


Jeremy M. Beaulieu

corHMM documentation built on July 20, 2017, 1:03 a.m.