readNexusMorph: Reads morphological character data In NEXUS Format

Description Usage Arguments Details Value Author(s)

View source: R/readNexusMorph.R

Description

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.

Usage

1

Arguments

file

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

Details

This parser is really just a hacked version of “read.nexus.data” 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 “read.nexus.data” this parser reads data from a file written in a restricted NEXUS format. I've posted on my website (http://www.jeremybeaulieu.org/r.html) an example NEXUS file properly formatted that will work with this function. But there is one major change worth mentioning here:

Value

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”.

Author(s)

Jeremy M. Beaulieu


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