Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fmichonneau committed Jul 9, 2015
1 parent b1578f9 commit b4bc86d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 27 deletions.
31 changes: 17 additions & 14 deletions R/rncl.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@
##' relevant elements as a list. \code{phylo} (from the ape package)
##' or \code{phylo4} (from the phylobase package) can be constructed
##' from the elements contained in this list.
##' @title Get all the elements from a NEXUS (or Newick) file
##'
##' @title Get the elements from a NEXUS (or Newick) file
##' @param file path to a NEXUS or Newick file
##' @param file.format a character string indicating the type of file
##' to be parsed.
##' @param spacesAsUnderscores In the NEXUS file format white spaces
##' are not allowed in taxa labels and are represented by
##' underscores. Therefore, NCL converts underscores found in taxa
##' labels in the NEXUS file into white spaces (e.g. \code{species_1}
##' will become \code{"species 1"}. If you want to preserve the
##' underscores, set as TRUE, the default).
##' @param char.all If TRUE (default), returns all characters, even
##' those excluded in the NEXUS file (only when NEXUS file contains
##' DATA block).
##' are not allowed and are represented by underscores. Therefore, NCL
##' converts underscores found in taxon labels in the NEXUS file into
##' white spaces (e.g. \code{species_1} will become \code{"species
##' 1"}). If you want to preserve the underscores, set as \code{TRUE}
##' (default). This option affects taxon labels, character labels and
##' state labels.
##' @param char.all If \code{TRUE} (default), returns all characters,
##' even those excluded in the NEXUS file (only when NEXUS file
##' contains DATA block).
##' @param polymorphic.convert If TRUE (default), converts polymorphic
##' characters to missing data (only when NEXUS file contains DATA
##' block).
Expand All @@ -35,12 +37,13 @@
##' Lewis, P. O. 2003. NCL: a C++ class library for interpreting data
##' files in NEXUS format. Bioinformatics 19 (17) : 2330-2331.
##' @author Francois Michonneau
##' @seealso For example on how to use the elements from the list
##' @seealso For examples on how to use the elements of the list
##' returned by this function to build tree objects, inspect the
##' source code of this package and how \code{read_newick_phylo} and
##' \code{read_nexus_phylo} work. For a more complex example that also
##' use the data contained in NEXUS files, inspect the source code of
##' the \code{readNCL} function in the phylobase package.
##' source code of this package, in particular how
##' \code{read_newick_phylo} and \code{read_nexus_phylo} work. For a
##' more complex example that also use the data contained in NEXUS
##' files, inspect the source code of the \code{readNCL} function in
##' the phylobase package.
##' @return A list that contains the elements extracted from a NEXUS
##' or a Newick file.
##'
Expand Down
28 changes: 15 additions & 13 deletions man/rncl.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ rncl(file, file.format = c("nexus", "newick"), spacesAsUnderscores = TRUE,
to be parsed.}

\item{spacesAsUnderscores}{In the NEXUS file format white spaces
are not allowed in taxa labels and are represented by
underscores. Therefore, NCL converts underscores found in taxa
labels in the NEXUS file into white spaces (e.g. \code{species_1}
will become \code{"species 1"}. If you want to preserve the
underscores, set as TRUE, the default).}
are not allowed and are represented by underscores. Therefore, NCL
converts underscores found in taxon labels in the NEXUS file into
white spaces (e.g. \code{species_1} will become \code{"species
1"}). If you want to preserve the underscores, set as \code{TRUE}
(default). This option affects taxon labels, character labels and
state labels.}

\item{char.all}{If TRUE (default), returns all characters, even
those excluded in the NEXUS file (only when NEXUS file contains
DATA block).}
\item{char.all}{If \code{TRUE} (default), returns all characters,
even those excluded in the NEXUS file (only when NEXUS file
contains DATA block).}

\item{polymorphic.convert}{If TRUE (default), converts polymorphic
characters to missing data (only when NEXUS file contains DATA
Expand Down Expand Up @@ -157,11 +158,12 @@ Lewis, P. O. 2003. NCL: a C++ class library for interpreting data
files in NEXUS format. Bioinformatics 19 (17) : 2330-2331.
}
\seealso{
For example on how to use the elements from the list
For examples on how to use the elements of the list
returned by this function to build tree objects, inspect the
source code of this package and how \code{read_newick_phylo} and
\code{read_nexus_phylo} work. For a more complex example that also
use the data contained in NEXUS files, inspect the source code of
the \code{readNCL} function in the phylobase package.
source code of this package, in particular how
\code{read_newick_phylo} and \code{read_nexus_phylo} work. For a
more complex example that also use the data contained in NEXUS
files, inspect the source code of the \code{readNCL} function in
the phylobase package.
}

0 comments on commit b4bc86d

Please sign in to comment.