% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse.nexus.R
\name{read.characters}
\alias{read.characters}
\alias{read.as.phydat}
\title{Read characters from Nexus file}
\usage{
read.characters(filepath, character_num = NULL, session = NULL)

read.as.phydat(filepath)
}
\arguments{
\item{filepath}{character string specifying location of file}

\item{character_num}{Index of character(s) to return.
\code{NULL}, the default, returns all characters.}

\item{session}{(optionally) a Shiny session with a numericInput named character_num
whose maximum should be updated.}
}
\value{
A matrix whose row names correspond to tip labels, and column names
correspond to character labels, with the attribute \code{state.labels}
listing the state labels for each character; or a character string
explaining why the character cannot be returned.
}
\description{
Parses Nexus file, reading character states and names
}
\details{
Tested with nexus files downloaded from MorphoBank with the "no notes"
option, but should also work more generally.

Do \href{https://github.org/TGuillerme/Inapp/issues}{report}
incorrectly parsed files.
}
\section{Functions}{
\itemize{
\item \code{read.as.phydat}: Read characters as phyDat object
}}

\references{
Maddison, D. R., Swofford, D. L. and Maddison, W. P. (1997)
NEXUS: an extensible file format for systematic information.
Systematic Biology, 46, 590–621.
}
\author{
Martin R. Smith

Martin R. Smith
}
