From 9b5307e7a85bbc60521237c5411765626713f785 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 18 May 2026 10:31:54 +0100 Subject: [PATCH 1/5] Harden NexusTokens for Cingulata-style polymorphism with internal whitespace No parser fix was needed: the existing gsub(" ", "", ...) at parse_files.R:88 already strips internal whitespace from polymorphism tokens before NexusTokens() sees them, so (1 2) -> (12) and {0 1} -> {01} already worked correctly. Added: - Regression test covering (1 2) / {0 1} polymorphism and multi-line matrix continuation in test-parsers.R. - NexusTokensToInteger(): a new exported helper that converts the character matrix from ReadCharacters() to integer, mapping polymorphic/ambiguous/?/- tokens to NA_integer_ by default, or extracting the first/last state digit under polymorphism = "first"/"last". Tests included. Co-Authored-By: Claude Sonnet 4.6 --- R/parse_files.R | 52 +++++++++++++++++++++++ tests/testthat/test-parsers.R | 78 +++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) diff --git a/R/parse_files.R b/R/parse_files.R index f701a1cf1..e18df9f58 100644 --- a/R/parse_files.R +++ b/R/parse_files.R @@ -884,6 +884,58 @@ PhyDat <- function(dataset) { MatrixToPhyDat(mat) } +#' Convert Nexus token matrix to integer +#' +#' `NexusTokensToInteger()` converts the character matrix returned by +#' [`ReadCharacters()`] to an integer matrix, mapping polymorphic, +#' ambiguous (`?`), and inapplicable (`-`) tokens to `NA_integer_` or to the +#' first/last state listed in the polymorphism, depending on `polymorphism`. +#' +#' @param tokens Character matrix as returned by [`ReadCharacters()`], or a +#' character vector. +#' @param polymorphism Character string specifying how to handle polymorphic +#' tokens such as `"(01)"` or `"{12}"`: +#' \describe{ +#' \item{`"NA"` (default)}{Map to `NA_integer_`.} +#' \item{`"first"`}{Use the first state digit inside the brackets.} +#' \item{`"last"`}{Use the last state digit inside the brackets.} +#' } +#' Tokens `"?"` and `"-"` always map to `NA_integer_`. +#' +#' @return An integer matrix (or vector) with the same dimensions and +#' `dimnames` as `tokens`. +#' +#' @examples +#' tokens <- matrix(c("0", "(12)", "1", "?", "-"), +#' nrow = 1, +#' dimnames = list("Taxon_A", paste0("C", 1:5))) +#' NexusTokensToInteger(tokens) +#' NexusTokensToInteger(tokens, polymorphism = "first") +#' +#' @family phylogenetic matrix conversion functions +#' @template MRS +#' @export +NexusTokensToInteger <- function(tokens, + polymorphism = c("NA", "first", "last")) { + polymorphism <- match.arg(polymorphism) + at <- attributes(tokens) + + x <- as.character(tokens) + result <- suppressWarnings(as.integer(x)) + + ambig <- is.na(result) & !is.na(x) & x != "?" & x != "-" + if (polymorphism != "NA" && any(ambig)) { + digits <- regmatches(x[ambig], + regexpr(if (polymorphism == "first") "\\d" else "\\d(?=[^\\d]*$)", + x[ambig], perl = TRUE)) + result[ambig] <- suppressWarnings(as.integer(digits)) + } + + attributes(result) <- at + result +} + + #' Rightmost character of string #' #' `RightmostCharacter()` is a convenience function that returns the final diff --git a/tests/testthat/test-parsers.R b/tests/testthat/test-parsers.R index 74b6b87f8..85f3ac8e8 100644 --- a/tests/testthat/test-parsers.R +++ b/tests/testthat/test-parsers.R @@ -32,6 +32,84 @@ test_that("Nexus file can be parsed", { expect_equal(3L, unique(as.integer(read[3, ]))) }) +test_that("ReadCharacters handles Cingulata-style polymorphism with internal whitespace", { + nexusContent <- "#NEXUS +BEGIN CHARACTERS; + DIMENSIONS NCHAR=5; + FORMAT DATATYPE=STANDARD MISSING=? GAP=-; + MATRIX + Taxon_A 0(1 2)1?- + Taxon_B 1{0 1}0?- + Taxon_C 01010 + ;" + + tf <- tempfile(fileext = ".nex") + on.exit(unlink(tf)) + writeLines(nexusContent, tf) + read <- ReadCharacters(tf) + + expect_equal(dim(read), c(3L, 5L)) + expect_equal(unname(read["Taxon_A", 2]), "(12)") + expect_equal(unname(read["Taxon_B", 2]), "{01}") + expect_equal(unname(read["Taxon_A", 4]), "?") + expect_equal(unname(read["Taxon_A", 5]), "-") + expect_equal(unname(read["Taxon_C", 1]), "0") + + # Continuation lines: data for a taxon split across multiple lines + nexusMulti <- "#NEXUS +BEGIN CHARACTERS; + DIMENSIONS NCHAR=6; + FORMAT DATATYPE=STANDARD MISSING=? GAP=-; + MATRIX + Taxon_A 0(1 2)1 + ?-1 + Taxon_B 1{0 1}0 + ?-0 + ;" + + tf2 <- tempfile(fileext = ".nex") + on.exit(unlink(tf2), add = TRUE) + writeLines(nexusMulti, tf2) + readMulti <- ReadCharacters(tf2) + + expect_equal(dim(readMulti), c(2L, 6L)) + expect_equal(unname(readMulti["Taxon_A", 2]), "(12)") + expect_equal(unname(readMulti["Taxon_B", 2]), "{01}") + expect_equal(unname(readMulti["Taxon_A", 6]), "1") + expect_equal(unname(readMulti["Taxon_B", 6]), "0") +}) + +test_that("NexusTokensToInteger() converts token matrix to integer", { + tokens <- matrix(c("0", "(12)", "1", "?", "-"), + nrow = 1L, + dimnames = list("Tax", paste0("C", 1:5))) + + # Default: polymorphisms and ambiguities become NA + result <- NexusTokensToInteger(tokens) + expect_equal(dim(result), c(1L, 5L)) + expect_equal(dimnames(result), list("Tax", paste0("C", 1:5))) + expect_equal(unname(result["Tax", "C1"]), 0L) + expect_equal(unname(result["Tax", "C2"]), NA_integer_) + expect_equal(unname(result["Tax", "C3"]), 1L) + expect_equal(unname(result["Tax", "C4"]), NA_integer_) + expect_equal(unname(result["Tax", "C5"]), NA_integer_) + + # polymorphism = "first": take first digit inside brackets + result_f <- NexusTokensToInteger(tokens, polymorphism = "first") + expect_equal(unname(result_f["Tax", "C2"]), 1L) + expect_equal(unname(result_f["Tax", "C4"]), NA_integer_) + + # polymorphism = "last": take last digit inside brackets + result_l <- NexusTokensToInteger(tokens, polymorphism = "last") + expect_equal(unname(result_l["Tax", "C2"]), 2L) + + # Braces form {01} + tokens2 <- matrix(c("{01}", "0"), nrow = 1L, dimnames = list("T1", c("C1", "C2"))) + expect_equal(unname(NexusTokensToInteger(tokens2)["T1", "C1"]), NA_integer_) + expect_equal(unname(NexusTokensToInteger(tokens2, "first")["T1", "C1"]), 0L) + expect_equal(unname(NexusTokensToInteger(tokens2, "last")["T1", "C1"]), 1L) +}) + test_that("NexusTokens() fails gracefully", { expect_error(NexusTokens("0123012301230123", integer(0))) expect_equal("Character number must be between 1 and 16.", From 5f3c7424aff7c74e2b9e103539ec68c7d0a8415c Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 18 May 2026 12:22:51 +0100 Subject: [PATCH 2/5] redoc w/ roxygen8 --- DESCRIPTION | 4 +- NAMESPACE | 1 + man/AddTip.Rd | 32 ++++++++-------- man/AncestorEdge.Rd | 26 ++++++------- man/CharacterInformation.Rd | 10 ++--- man/Cherries.Rd | 26 ++++++------- man/CladeSizes.Rd | 26 ++++++------- man/CladisticInfo.Rd | 14 +++---- man/ClusterTable-methods.Rd | 18 ++++----- man/ClusterTable.Rd | 18 ++++----- man/CollapseNode.Rd | 32 ++++++++-------- man/Consensus.Rd | 14 +++---- man/ConsensusWithout.Rd | 64 +++++++++++++++---------------- man/ConstrainedNJ.Rd | 4 +- man/Decompose.Rd | 9 +++-- man/DescendantEdges.Rd | 26 ++++++------- man/DoubleFactorial.Rd | 2 +- man/DropTip.Rd | 40 +++++++++---------- man/EdgeAncestry.Rd | 26 ++++++------- man/EdgeDistances.Rd | 26 ++++++------- man/EdgeRatio.Rd | 26 ++++++------- man/EndSentence.Rd | 10 ++--- man/GenerateTree.Rd | 6 +-- man/Hamming.Rd | 16 ++++---- man/ImposeConstraint.Rd | 32 ++++++++-------- man/J1Index.Rd | 8 ++-- man/KeptPaths.Rd | 32 ++++++++-------- man/KeptVerts.Rd | 32 ++++++++-------- man/LabelSplits.Rd | 18 ++++----- man/LeafLabelInterchange.Rd | 32 ++++++++-------- man/ListAncestors.Rd | 40 +++++++------------ man/LongBranch.Rd | 26 ++++++------- man/MRCA.Rd | 26 ++++++------- man/MSTEdges.Rd | 16 ++++---- man/MakeTreeBinary.Rd | 32 ++++++++-------- man/MatchEdges.Rd | 52 ++++++++++++------------- man/MatchStrings.Rd | 10 ++--- man/MatrixToPhyDat.Rd | 9 +++-- man/MorphoBankDecode.Rd | 10 ++--- man/NDescendants.Rd | 26 ++++++------- man/NJTree.Rd | 4 +- man/NRooted.Rd | 6 +-- man/NSplits.Rd | 44 ++++++++++----------- man/NTip.Rd | 44 ++++++++++----------- man/Neworder.Rd | 4 +- man/NexusTokensToInteger.Rd | 64 +++++++++++++++++++++++++++++++ man/NodeDepth.Rd | 26 ++++++------- man/NodeNumbers.Rd | 52 ++++++++++++------------- man/NodeOrder.Rd | 26 ++++++------- man/PathLengths.Rd | 26 ++++++------- man/PhyToString.Rd | 9 +++-- man/PolarizeSplits.Rd | 18 ++++----- man/ReadMrBayesTrees.Rd | 4 +- man/ReadTntTree.Rd | 4 +- man/Renumber.Rd | 32 ++++++++-------- man/RenumberTips.Rd | 32 ++++++++-------- man/Reorder.Rd | 37 ++++++++---------- man/Reweight.Rd | 9 +++-- man/RightmostCharacter.Rd | 10 ++--- man/RoguePlot.Rd | 6 +-- man/RootNode.Rd | 26 ++++++------- man/RootTree.Rd | 32 ++++++++-------- man/SampleOne.Rd | 16 ++++---- man/SortTree.Rd | 32 ++++++++-------- man/SplitConsistent.Rd | 8 ++-- man/SplitFrequency.Rd | 18 ++++----- man/SplitInformation.Rd | 10 ++--- man/SplitMatchProbability.Rd | 10 ++--- man/Splits.Rd | 20 +++++----- man/SplitsInBinaryTree.Rd | 44 ++++++++++----------- man/Stemwardness.Rd | 10 ++--- man/Subsplit.Rd | 8 ++-- man/Subtree.Rd | 32 ++++++++-------- man/TipLabels.Rd | 46 +++++++++++----------- man/TipTimedTree.Rd | 48 +++++++++++------------ man/TipsInSplits.Rd | 18 ++++----- man/TotalCopheneticIndex.Rd | 8 ++-- man/TreeIsRooted.Rd | 26 ++++++------- man/TreeNumber.Rd | 12 +++--- man/TreeTools-package.Rd | 5 +++ man/Treeness.Rd | 26 ++++++------- man/TreesMatchingSplit.Rd | 10 ++--- man/TreesMatchingTree.Rd | 6 +-- man/TrivialSplits.Rd | 8 ++-- man/TrivialTree.Rd | 40 +++++++++---------- man/Unquote.Rd | 10 ++--- man/UnrootedTreesMatchingSplit.Rd | 10 ++--- man/UnshiftTree.Rd | 16 ++++---- man/as.multiPhylo.Rd | 16 ++++---- man/doubleFactorials.Rd | 4 +- man/is.TreeNumber.Rd | 4 +- man/logDoubleFactorials.Rd | 4 +- man/match.Splits.Rd | 20 +++++----- man/match.multiPhylo.Rd | 18 ++++----- man/print.TreeNumber.Rd | 4 +- man/sapply64.Rd | 16 ++++---- man/sort.multiPhylo.Rd | 16 ++++---- man/xor.Rd | 18 ++++----- 98 files changed, 1033 insertions(+), 976 deletions(-) create mode 100644 man/NexusTokensToInteger.Rd diff --git a/DESCRIPTION b/DESCRIPTION index a8dba10dd..1e2db65ca 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: TreeTools Title: Create, Modify and Analyse Phylogenetic Trees -Version: 2.3.0 +Version: 2.3.0.9000 Authors@R: c( person("Martin R.", 'Smith', role = c("aut", "cre", "cph"), email = "martin.smith@durham.ac.uk", @@ -63,6 +63,7 @@ Config/Needs/memcheck: devtools Config/Needs/metadata: codemeta Config/Needs/revdeps: revdepcheck Config/Needs/website: pkgdown +Config/roxygen2/version: 8.0.0 Config/testthat/parallel: false Config/testthat/edition: 3 LinkingTo: Rcpp @@ -72,5 +73,4 @@ ByteCompile: true Encoding: UTF-8 Language: en-GB VignetteBuilder: knitr -RoxygenNote: 7.3.3 Roxygen: list(markdown = TRUE) diff --git a/NAMESPACE b/NAMESPACE index 7f34d68f7..e3501d5e7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -372,6 +372,7 @@ export(NewickTree) export(NeworderPhylo) export(NeworderPruningwise) export(NexusTokens) +export(NexusTokensToInteger) export(NodeDepth) export(NodeNumbers) export(NodeOrder) diff --git a/man/AddTip.Rd b/man/AddTip.Rd index 9ec98e237..c28d82e22 100644 --- a/man/AddTip.Rd +++ b/man/AddTip.Rd @@ -114,22 +114,22 @@ par(oldPar) \seealso{ Add one tree to another: \code{\link[ape]{bind.tree}()} -Other tree manipulation: -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/AncestorEdge.Rd b/man/AncestorEdge.Rd index 90c2e6cb5..1f8a0e2ad 100644 --- a/man/AncestorEdge.Rd +++ b/man/AncestorEdge.Rd @@ -35,19 +35,19 @@ which(AncestorEdge(5, parent, child)) } \seealso{ -Other tree navigation: -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \concept{tree navigation} \keyword{internal} diff --git a/man/CharacterInformation.Rd b/man/CharacterInformation.Rd index b305b20fc..17bad0f9c 100644 --- a/man/CharacterInformation.Rd +++ b/man/CharacterInformation.Rd @@ -30,11 +30,11 @@ evaluate the degree of homoplasy within a dataset. \insertAllCited{} } \seealso{ -Other split information functions: -\code{\link{SplitInformation}()}, -\code{\link{SplitMatchProbability}()}, -\code{\link{TreesMatchingSplit}()}, -\code{\link{UnrootedTreesMatchingSplit}()} +Other split information functions: +\code{\link[=SplitInformation]{SplitInformation()}}, +\code{\link[=SplitMatchProbability]{SplitMatchProbability()}}, +\code{\link[=TreesMatchingSplit]{TreesMatchingSplit()}}, +\code{\link[=UnrootedTreesMatchingSplit]{UnrootedTreesMatchingSplit()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/Cherries.Rd b/man/Cherries.Rd index 0a64c1430..6fd676454 100644 --- a/man/Cherries.Rd +++ b/man/Cherries.Rd @@ -33,19 +33,19 @@ are both leaves. \insertAllCited{} } \seealso{ -Other tree properties: -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/CladeSizes.Rd b/man/CladeSizes.Rd index c95760fa8..1801a85d4 100644 --- a/man/CladeSizes.Rd +++ b/man/CladeSizes.Rd @@ -31,18 +31,18 @@ CladeSizes(tree, nodes = c(1, 8, 9)) } \seealso{ -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \concept{tree navigation} diff --git a/man/CladisticInfo.Rd b/man/CladisticInfo.Rd index eefd6d4b0..6e2e981e7 100644 --- a/man/CladisticInfo.Rd +++ b/man/CladisticInfo.Rd @@ -54,15 +54,15 @@ counting the number of edges resolved \insertCite{Page1992}{TreeTools}. \insertAllCited{} } \seealso{ -Other tree information functions: -\code{\link{NRooted}()}, -\code{\link{TreesMatchingTree}()} +Other tree information functions: +\code{\link[=NRooted]{NRooted()}}, +\code{\link[=TreesMatchingTree]{TreesMatchingTree()}} -Other tree characterization functions: -\code{\link{Consensus}()}, -\code{\link{J1Index}()}, +Other tree characterization functions: +\code{\link[=Consensus]{Consensus()}}, +\code{\link[=J1Index]{J1Index()}}, \code{\link{Stemwardness}}, -\code{\link{TotalCopheneticIndex}()} +\code{\link[=TotalCopheneticIndex]{TotalCopheneticIndex()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/ClusterTable-methods.Rd b/man/ClusterTable-methods.Rd index 4a2cdb71d..38247bb47 100644 --- a/man/ClusterTable-methods.Rd +++ b/man/ClusterTable-methods.Rd @@ -28,17 +28,17 @@ print(clustab) summary(clustab) } \seealso{ -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/ClusterTable.Rd b/man/ClusterTable.Rd index e3cfb35c3..31682ceee 100644 --- a/man/ClusterTable.Rd +++ b/man/ClusterTable.Rd @@ -61,17 +61,17 @@ ctList[[2]] \seealso{ \link[=ClusterTable-methods]{S3 methods} for \code{ClusterTable} objects. -Other utility functions: +Other utility functions: \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/CollapseNode.Rd b/man/CollapseNode.Rd index 38f0ab27b..78c886a47 100644 --- a/man/CollapseNode.Rd +++ b/man/CollapseNode.Rd @@ -57,22 +57,22 @@ par(oldPar) } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/Consensus.Rd b/man/Consensus.Rd index 6239fa66b..d29239933 100644 --- a/man/Consensus.Rd +++ b/man/Consensus.Rd @@ -34,15 +34,15 @@ Consensus(as.phylo(0:2, 8)) \code{TreeDist::ConsensusInfo()} calculates the information content of a consensus tree. -Other consensus tree functions: -\code{\link{ConsensusWithout}()}, -\code{\link{RoguePlot}()} +Other consensus tree functions: +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=RoguePlot]{RoguePlot()}} -Other tree characterization functions: -\code{\link{CladisticInfo}()}, -\code{\link{J1Index}()}, +Other tree characterization functions: +\code{\link[=CladisticInfo]{CladisticInfo()}}, +\code{\link[=J1Index]{J1Index()}}, \code{\link{Stemwardness}}, -\code{\link{TotalCopheneticIndex}()} +\code{\link[=TotalCopheneticIndex]{TotalCopheneticIndex()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/ConsensusWithout.Rd b/man/ConsensusWithout.Rd index 2ffcf25f7..69183fcfa 100644 --- a/man/ConsensusWithout.Rd +++ b/man/ConsensusWithout.Rd @@ -61,41 +61,41 @@ MarkMissing("t2") par(oldPar) } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} -Other consensus tree functions: -\code{\link{Consensus}()}, -\code{\link{RoguePlot}()} +Other consensus tree functions: +\code{\link[=Consensus]{Consensus()}}, +\code{\link[=RoguePlot]{RoguePlot()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/ConstrainedNJ.Rd b/man/ConstrainedNJ.Rd index 920aef73a..3df6db357 100644 --- a/man/ConstrainedNJ.Rd +++ b/man/ConstrainedNJ.Rd @@ -41,9 +41,9 @@ constraint <- MatrixToPhyDat( plot(ConstrainedNJ(dataset, constraint)) } \seealso{ -Other tree generation functions: +Other tree generation functions: \code{\link{GenerateTree}}, -\code{\link{NJTree}()}, +\code{\link[=NJTree]{NJTree()}}, \code{\link{TreeNumber}}, \code{\link{TrivialTree}} } diff --git a/man/Decompose.Rd b/man/Decompose.Rd index 2b7421ea1..1461d624e 100644 --- a/man/Decompose.Rd +++ b/man/Decompose.Rd @@ -71,10 +71,11 @@ NumberOfChars(decomposed) # 116 characters in decomposed \insertAllCited{} } \seealso{ -Other phylogenetic matrix conversion functions: -\code{\link{MatrixToPhyDat}()}, -\code{\link{Reweight}()}, -\code{\link{StringToPhyDat}()} +Other phylogenetic matrix conversion functions: +\code{\link[=MatrixToPhyDat]{MatrixToPhyDat()}}, +\code{\link[=NexusTokensToInteger]{NexusTokensToInteger()}}, +\code{\link[=Reweight]{Reweight()}}, +\code{\link[=StringToPhyDat]{StringToPhyDat()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/DescendantEdges.Rd b/man/DescendantEdges.Rd index 970674d73..da8b55bce 100644 --- a/man/DescendantEdges.Rd +++ b/man/DescendantEdges.Rd @@ -64,18 +64,18 @@ which(tips) tiplabels(bg = 3 + tips) } \seealso{ -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \concept{tree navigation} diff --git a/man/DoubleFactorial.Rd b/man/DoubleFactorial.Rd index ef72a893e..b6208bc9d 100644 --- a/man/DoubleFactorial.Rd +++ b/man/DoubleFactorial.Rd @@ -55,7 +55,7 @@ exp(LnDoubleFactorial.int (8)) # log(2 * 4 * 6 * 8) DoubleFactorial64(31) } \seealso{ -Other double factorials: +Other double factorials: \code{\link{doubleFactorials}}, \code{\link{logDoubleFactorials}} } diff --git a/man/DropTip.Rd b/man/DropTip.Rd index fc9debfaa..9910b3862 100644 --- a/man/DropTip.Rd +++ b/man/DropTip.Rd @@ -109,28 +109,28 @@ plot(DropTip(unrooted, 4:5)) summary(DropTip(as.Splits(tree), 4:5)) } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} -Other split manipulation functions: -\code{\link{SplitConsistent}()}, -\code{\link{Subsplit}()}, -\code{\link{TrivialSplits}()} +Other split manipulation functions: +\code{\link[=SplitConsistent]{SplitConsistent()}}, +\code{\link[=Subsplit]{Subsplit()}}, +\code{\link[=TrivialSplits]{TrivialSplits()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/EdgeAncestry.Rd b/man/EdgeAncestry.Rd index a83a01cf6..a275db78b 100644 --- a/man/EdgeAncestry.Rd +++ b/man/EdgeAncestry.Rd @@ -41,19 +41,19 @@ which(EdgeAncestry(7, parent, child, stopAt = 4)) } \seealso{ -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/EdgeDistances.Rd b/man/EdgeDistances.Rd index 1fb36344d..25d5383d0 100644 --- a/man/EdgeDistances.Rd +++ b/man/EdgeDistances.Rd @@ -31,19 +31,19 @@ EdgeDistances(tree) } \seealso{ -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/EdgeRatio.Rd b/man/EdgeRatio.Rd index c397eb722..a7433d77c 100644 --- a/man/EdgeRatio.Rd +++ b/man/EdgeRatio.Rd @@ -25,19 +25,19 @@ Where tree length is dominated by internal edges, variation between tips is dominantly controlled by phylogenetic history. } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/EndSentence.Rd b/man/EndSentence.Rd index 71fdf203d..fb12cc634 100644 --- a/man/EndSentence.Rd +++ b/man/EndSentence.Rd @@ -20,11 +20,11 @@ Add full stop to end of a sentence EndSentence("Hello World") # "Hello World." } \seealso{ -Other string parsing functions: -\code{\link{MatchStrings}()}, -\code{\link{MorphoBankDecode}()}, -\code{\link{RightmostCharacter}()}, -\code{\link{Unquote}()} +Other string parsing functions: +\code{\link[=MatchStrings]{MatchStrings()}}, +\code{\link[=MorphoBankDecode]{MorphoBankDecode()}}, +\code{\link[=RightmostCharacter]{RightmostCharacter()}}, +\code{\link[=Unquote]{Unquote()}} } \author{ Martin R. Smith diff --git a/man/GenerateTree.Rd b/man/GenerateTree.Rd index 8f5098e1a..7299e313a 100644 --- a/man/GenerateTree.Rd +++ b/man/GenerateTree.Rd @@ -81,9 +81,9 @@ plot(StarTree(LETTERS[1:10])) \insertAllCited() } \seealso{ -Other tree generation functions: -\code{\link{ConstrainedNJ}()}, -\code{\link{NJTree}()}, +Other tree generation functions: +\code{\link[=ConstrainedNJ]{ConstrainedNJ()}}, +\code{\link[=NJTree]{NJTree()}}, \code{\link{TreeNumber}}, \code{\link{TrivialTree}} } diff --git a/man/Hamming.Rd b/man/Hamming.Rd index 9ab5fc982..4d76e19f0 100644 --- a/man/Hamming.Rd +++ b/man/Hamming.Rd @@ -59,17 +59,17 @@ Used to construct neighbour joining trees in \code{\link[=NJTree]{NJTree()}}. \code{dist.hamming()} in the \pkg{phangorn} package provides an alternative implementation. -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/ImposeConstraint.Rd b/man/ImposeConstraint.Rd index f74a1438b..e18fb6171 100644 --- a/man/ImposeConstraint.Rd +++ b/man/ImposeConstraint.Rd @@ -49,22 +49,22 @@ constraint <- StringToPhyDat("0000?1111 000111111 0000??110", tips, FALSE) plot(ImposeConstraint(tree, constraint)) } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/J1Index.Rd b/man/J1Index.Rd index b28ad9695..2d755de8e 100644 --- a/man/J1Index.Rd +++ b/man/J1Index.Rd @@ -83,11 +83,11 @@ J1Index(sym_tree2) \insertAllCited{} } \seealso{ -Other tree characterization functions: -\code{\link{CladisticInfo}()}, -\code{\link{Consensus}()}, +Other tree characterization functions: +\code{\link[=CladisticInfo]{CladisticInfo()}}, +\code{\link[=Consensus]{Consensus()}}, \code{\link{Stemwardness}}, -\code{\link{TotalCopheneticIndex}()} +\code{\link[=TotalCopheneticIndex]{TotalCopheneticIndex()}} } \author{ Rob Noble, adapted by Martin R. Smith diff --git a/man/KeptPaths.Rd b/man/KeptPaths.Rd index 8ccf292af..f3fba68a0 100644 --- a/man/KeptPaths.Rd +++ b/man/KeptPaths.Rd @@ -41,22 +41,22 @@ KeptPaths(paths, keptVerts) paths[KeptPaths(paths, keptVerts, all = FALSE), ] } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/KeptVerts.Rd b/man/KeptVerts.Rd index 9c3a53914..2621dc909 100644 --- a/man/KeptVerts.Rd +++ b/man/KeptVerts.Rd @@ -44,22 +44,22 @@ map <- which(kept) # Node `i` in the reduced tree corresponds to node `map[i]` in the original. } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/LabelSplits.Rd b/man/LabelSplits.Rd index e3cd9b1fe..37265cf98 100644 --- a/man/LabelSplits.Rd +++ b/man/LabelSplits.Rd @@ -71,16 +71,16 @@ Calculate split support: \code{\link[=SplitFrequency]{SplitFrequency()}} Colour labels according to value: \code{\link[=SupportColour]{SupportColour()}} -Other Splits operations: -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, +Other Splits operations: +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \concept{Splits operations} diff --git a/man/LeafLabelInterchange.Rd b/man/LeafLabelInterchange.Rd index 724f58530..6afb89c3a 100644 --- a/man/LeafLabelInterchange.Rd +++ b/man/LeafLabelInterchange.Rd @@ -34,22 +34,22 @@ plot(LeafLabelInterchange(tree, 3L)) } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/ListAncestors.Rd b/man/ListAncestors.Rd index 6db3a3f4a..1141631bd 100644 --- a/man/ListAncestors.Rd +++ b/man/ListAncestors.Rd @@ -74,33 +74,19 @@ AllAncestors(edge[, 1], edge[, 2]) Implemented less efficiently in \code{phangorn:::Ancestors}, on which this code is based. -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} - -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/LongBranch.Rd b/man/LongBranch.Rd index bc8df9c7e..59b53f327 100644 --- a/man/LongBranch.Rd +++ b/man/LongBranch.Rd @@ -44,19 +44,19 @@ threshold <- quantile(lb, 0.75) tree$tip.label[lb > threshold] } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/MRCA.Rd b/man/MRCA.Rd index 373ed1447..f7aaef40f 100644 --- a/man/MRCA.Rd +++ b/man/MRCA.Rd @@ -46,19 +46,19 @@ ancestors <- lapply(seq_len(max(edge)), ListAncestors, } \seealso{ -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/MSTEdges.Rd b/man/MSTEdges.Rd index ebeb8b929..e9c0a0fd9 100644 --- a/man/MSTEdges.Rd +++ b/man/MSTEdges.Rd @@ -54,17 +54,17 @@ MSTEdges(distances, TRUE, x = points[, 1], y = points[, 2], lwd = 2) Slow implementation returning the association matrix of the minimum spanning tree: \code{\link[ape:mst]{ape::mst()}}. -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/MakeTreeBinary.Rd b/man/MakeTreeBinary.Rd index 9de537e87..715ce3d17 100644 --- a/man/MakeTreeBinary.Rd +++ b/man/MakeTreeBinary.Rd @@ -29,22 +29,22 @@ Since ape v5.5, this functionality is available through in equal frequencies. \code{MakeTreeBinary()} is often somewhat faster; \code{multi2di()} retains edge lengths. -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/MatchEdges.Rd b/man/MatchEdges.Rd index 0266a92bb..fcafeffcd 100644 --- a/man/MatchEdges.Rd +++ b/man/MatchEdges.Rd @@ -33,33 +33,33 @@ this function is proving a bottleneck. MatchNodes(BalancedTree(8), RootTree(BalancedTree(8))) } \seealso{ -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/MatchStrings.Rd b/man/MatchStrings.Rd index b3b605a35..f30a1aa78 100644 --- a/man/MatchStrings.Rd +++ b/man/MatchStrings.Rd @@ -27,11 +27,11 @@ tree <- BalancedTree(8) MatchStrings(c("t1", "tip2", "t3"), TipLabels(tree), Fail = message) } \seealso{ -Other string parsing functions: -\code{\link{EndSentence}()}, -\code{\link{MorphoBankDecode}()}, -\code{\link{RightmostCharacter}()}, -\code{\link{Unquote}()} +Other string parsing functions: +\code{\link[=EndSentence]{EndSentence()}}, +\code{\link[=MorphoBankDecode]{MorphoBankDecode()}}, +\code{\link[=RightmostCharacter]{RightmostCharacter()}}, +\code{\link[=Unquote]{Unquote()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/MatrixToPhyDat.Rd b/man/MatrixToPhyDat.Rd index 6b09ab69f..b57517b05 100644 --- a/man/MatrixToPhyDat.Rd +++ b/man/MatrixToPhyDat.Rd @@ -66,10 +66,11 @@ data("Lobo", package = "TreeTools") head(PhyDatToMatrix(Lobo.phy)[, 91:93]) } \seealso{ -Other phylogenetic matrix conversion functions: -\code{\link{Decompose}()}, -\code{\link{Reweight}()}, -\code{\link{StringToPhyDat}()} +Other phylogenetic matrix conversion functions: +\code{\link[=Decompose]{Decompose()}}, +\code{\link[=NexusTokensToInteger]{NexusTokensToInteger()}}, +\code{\link[=Reweight]{Reweight()}}, +\code{\link[=StringToPhyDat]{StringToPhyDat()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/MorphoBankDecode.Rd b/man/MorphoBankDecode.Rd index 27a7a2f8a..5de8e2f88 100644 --- a/man/MorphoBankDecode.Rd +++ b/man/MorphoBankDecode.Rd @@ -17,11 +17,11 @@ reformatted. Converts strings from MorphoBank notes into a Latex-compatible format. } \seealso{ -Other string parsing functions: -\code{\link{EndSentence}()}, -\code{\link{MatchStrings}()}, -\code{\link{RightmostCharacter}()}, -\code{\link{Unquote}()} +Other string parsing functions: +\code{\link[=EndSentence]{EndSentence()}}, +\code{\link[=MatchStrings]{MatchStrings()}}, +\code{\link[=RightmostCharacter]{RightmostCharacter()}}, +\code{\link[=Unquote]{Unquote()}} } \author{ Martin R. Smith diff --git a/man/NDescendants.Rd b/man/NDescendants.Rd index 3d37b9ee8..05faba9ee 100644 --- a/man/NDescendants.Rd +++ b/man/NDescendants.Rd @@ -25,19 +25,19 @@ nodelabels(NDescendants(tree)) } \seealso{ -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/NJTree.Rd b/man/NJTree.Rd index 2b5c7c57b..0d1f7b2cf 100644 --- a/man/NJTree.Rd +++ b/man/NJTree.Rd @@ -28,8 +28,8 @@ NJTree(Lobo.phy) } \seealso{ -Other tree generation functions: -\code{\link{ConstrainedNJ}()}, +Other tree generation functions: +\code{\link[=ConstrainedNJ]{ConstrainedNJ()}}, \code{\link{GenerateTree}}, \code{\link{TreeNumber}}, \code{\link{TrivialTree}} diff --git a/man/NRooted.Rd b/man/NRooted.Rd index b05c72a0e..90dec4746 100644 --- a/man/NRooted.Rd +++ b/man/NRooted.Rd @@ -122,9 +122,9 @@ NUnrootedSplits(3, 3) \insertAllCited{} } \seealso{ -Other tree information functions: -\code{\link{CladisticInfo}()}, -\code{\link{TreesMatchingTree}()} +Other tree information functions: +\code{\link[=CladisticInfo]{CladisticInfo()}}, +\code{\link[=TreesMatchingTree]{TreesMatchingTree()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/NSplits.Rd b/man/NSplits.Rd index ffc96ad37..50f87823d 100644 --- a/man/NSplits.Rd +++ b/man/NSplits.Rd @@ -52,31 +52,31 @@ NSplits(PectinateTree(8)) NSplits(as.Splits(BalancedTree(8))) } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/NTip.Rd b/man/NTip.Rd index b95724fd8..927cb984f 100644 --- a/man/NTip.Rd +++ b/man/NTip.Rd @@ -40,31 +40,31 @@ objects of class \code{Splits} and \code{list}, and edge matrices (equivalent to \code{tree$edge}). } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \concept{Splits operations} \concept{tree properties} diff --git a/man/Neworder.Rd b/man/Neworder.Rd index 0c6394958..47c22183e 100644 --- a/man/Neworder.Rd +++ b/man/Neworder.Rd @@ -51,8 +51,8 @@ tree[["edge"]] <- tree[["edge"]][pruningwise, ] } \seealso{ -Other C wrappers: -\code{\link{RenumberTree}()} +Other C wrappers: +\code{\link[=RenumberTree]{RenumberTree()}} } \author{ \itemize{ diff --git a/man/NexusTokensToInteger.Rd b/man/NexusTokensToInteger.Rd new file mode 100644 index 000000000..4ccbf16bf --- /dev/null +++ b/man/NexusTokensToInteger.Rd @@ -0,0 +1,64 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/parse_files.R +\name{NexusTokensToInteger} +\alias{NexusTokensToInteger} +\title{Convert Nexus token matrix to integer} +\usage{ +NexusTokensToInteger(tokens, polymorphism = c("?", "first", "last")) +} +\arguments{ +\item{tokens}{Character matrix as returned by \code{\link[=ReadCharacters]{ReadCharacters()}}, a +character vector as returned by \code{\link[=NexusTokens]{NexusTokens()}}, or a \code{phyDat} object.} + +\item{polymorphism}{Character string specifying how to handle polymorphic +tokens such as \code{"(01)"} or \code{"{12}"}: +\describe{ +\item{\code{"?"} (default)}{Treat as the NEXUS missing-data token: map to +\code{NA_integer_}.} +\item{\code{"first"}}{Use the first state digit inside the brackets.} +\item{\code{"last"}}{Use the last state digit inside the brackets.} +} +Tokens \code{"?"} and \code{"-"} always map to \code{NA_integer_} regardless of +\code{polymorphism}.} +} +\value{ +An integer matrix (or vector) with the same dimensions and +\code{dimnames} as \code{tokens}. +} +\description{ +\code{NexusTokensToInteger()} converts the character matrix returned by +\code{\link[=ReadCharacters]{ReadCharacters()}} to an integer matrix, mapping polymorphic, +ambiguous (\verb{?}), and inapplicable (\code{-}) tokens to \code{NA_integer_} or to the +first/last state listed in the polymorphism, depending on \code{polymorphism}. +} +\details{ +Only digit states \code{0}..\code{9} are recognised; non-digit symbols (and any +token whose interior contains no digits) become \code{NA_integer_}. +Polymorphism extraction (\code{polymorphism = "first"}/\code{"last"}) likewise +considers digits only. + +If \code{tokens} is a \code{phyDat} object it is first converted via +\code{\link[=PhyDatToMatrix]{PhyDatToMatrix()}} with \verb{ambigNA = TRUE, inappNA = TRUE}, so that +fully-ambiguous and inapplicable rows become \code{NA_integer_} and only +true partial polymorphisms are subject to the \code{polymorphism} rule. +} +\examples{ +tokens <- matrix(c("0", "(12)", "1", "?", "-"), + nrow = 1, + dimnames = list("Taxon_A", paste0("C", 1:5))) +NexusTokensToInteger(tokens) +NexusTokensToInteger(tokens, polymorphism = "first") + +} +\seealso{ +Other phylogenetic matrix conversion functions: +\code{\link[=Decompose]{Decompose()}}, +\code{\link[=MatrixToPhyDat]{MatrixToPhyDat()}}, +\code{\link[=Reweight]{Reweight()}}, +\code{\link[=StringToPhyDat]{StringToPhyDat()}} +} +\author{ +\href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} +(\href{mailto:martin.smith@durham.ac.uk}{martin.smith@durham.ac.uk}) +} +\concept{phylogenetic matrix conversion functions} diff --git a/man/NodeDepth.Rd b/man/NodeDepth.Rd index a174896f5..8762130b7 100644 --- a/man/NodeDepth.Rd +++ b/man/NodeDepth.Rd @@ -42,19 +42,19 @@ nodelabels(NodeDepth(tree, includeTips = FALSE)) \code{\link[ape:node.depth]{ape::node.depth}} returns the number of tips descended from a node. -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/NodeNumbers.Rd b/man/NodeNumbers.Rd index adc763ef0..ca0a42acb 100644 --- a/man/NodeNumbers.Rd +++ b/man/NodeNumbers.Rd @@ -21,33 +21,33 @@ Numeric index of each node in a tree \code{NodeNumbers()} returns a sequence corresponding to the nodes in a tree } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeOrder}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeOrder]{NodeOrder()}}, +\code{\link[=RootNode]{RootNode()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/NodeOrder.Rd b/man/NodeOrder.Rd index 6c7c623a5..e68de7954 100644 --- a/man/NodeOrder.Rd +++ b/man/NodeOrder.Rd @@ -33,19 +33,19 @@ nodelabels(NodeOrder(tree, internalOnly = TRUE)) } \seealso{ -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{RootNode}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=RootNode]{RootNode()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/PathLengths.Rd b/man/PathLengths.Rd index a64b2e918..828b56cf2 100644 --- a/man/PathLengths.Rd +++ b/man/PathLengths.Rd @@ -38,19 +38,19 @@ tiplabels() PathLengths(tree) } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/PhyToString.Rd b/man/PhyToString.Rd index 849a0284c..021b30e3d 100644 --- a/man/PhyToString.Rd +++ b/man/PhyToString.Rd @@ -94,10 +94,11 @@ PhyToString(phyDat, concatenate = FALSE) } \seealso{ -Other phylogenetic matrix conversion functions: -\code{\link{Decompose}()}, -\code{\link{MatrixToPhyDat}()}, -\code{\link{Reweight}()} +Other phylogenetic matrix conversion functions: +\code{\link[=Decompose]{Decompose()}}, +\code{\link[=MatrixToPhyDat]{MatrixToPhyDat()}}, +\code{\link[=NexusTokensToInteger]{NexusTokensToInteger()}}, +\code{\link[=Reweight]{Reweight()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/PolarizeSplits.Rd b/man/PolarizeSplits.Rd index 011fa3700..a401ea3bc 100644 --- a/man/PolarizeSplits.Rd +++ b/man/PolarizeSplits.Rd @@ -20,16 +20,16 @@ represented by a zero bit Polarize splits on a single taxon } \seealso{ -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{SplitFrequency}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \concept{Splits operations} diff --git a/man/ReadMrBayesTrees.Rd b/man/ReadMrBayesTrees.Rd index d8ae0d022..793917b12 100644 --- a/man/ReadMrBayesTrees.Rd +++ b/man/ReadMrBayesTrees.Rd @@ -45,8 +45,8 @@ computed using the Bayesian inference software \href{https://nbisweden.github.io } } \seealso{ -Other tree import functions: -\code{\link{ReadTntTree}()} +Other tree import functions: +\code{\link[=ReadTntTree]{ReadTntTree()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/ReadTntTree.Rd b/man/ReadTntTree.Rd index 395fb29af..71031a633 100644 --- a/man/ReadTntTree.Rd +++ b/man/ReadTntTree.Rd @@ -114,8 +114,8 @@ TNTText2Tree("(A (B (C (D E ))));") } \seealso{ -Other tree import functions: -\code{\link{ReadMrBayesTrees}()} +Other tree import functions: +\code{\link[=ReadMrBayesTrees]{ReadMrBayesTrees()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/Renumber.Rd b/man/Renumber.Rd index 6b8e435a7..5cab210ba 100644 --- a/man/Renumber.Rd +++ b/man/Renumber.Rd @@ -34,22 +34,22 @@ Renumber(tree) \code{Preorder()} provides a faster and simpler alternative, but also rotates nodes. -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/RenumberTips.Rd b/man/RenumberTips.Rd index 6a0b1f86b..77de7de11 100644 --- a/man/RenumberTips.Rd +++ b/man/RenumberTips.Rd @@ -45,22 +45,22 @@ tree <- RenumberTips(tree, names(Lobo.phy)) } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/Reorder.Rd b/man/Reorder.Rd index 210be3e78..c49b15a9f 100644 --- a/man/Reorder.Rd +++ b/man/Reorder.Rd @@ -243,28 +243,25 @@ each tip in sequence. \seealso{ Rotate each node into a consistent orientation with \code{\link[=SortTree]{SortTree()}}. -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} -Other C wrappers: -\code{\link{Neworder}} - -Other C wrappers: +Other C wrappers: \code{\link{Neworder}} } \author{ diff --git a/man/Reweight.Rd b/man/Reweight.Rd index dc5d199e9..db3d6e894 100644 --- a/man/Reweight.Rd +++ b/man/Reweight.Rd @@ -66,10 +66,11 @@ Reweight(dat, c("3" = 0, "2" = 2)) \insertAllCited{} } \seealso{ -Other phylogenetic matrix conversion functions: -\code{\link{Decompose}()}, -\code{\link{MatrixToPhyDat}()}, -\code{\link{StringToPhyDat}()} +Other phylogenetic matrix conversion functions: +\code{\link[=Decompose]{Decompose()}}, +\code{\link[=MatrixToPhyDat]{MatrixToPhyDat()}}, +\code{\link[=NexusTokensToInteger]{NexusTokensToInteger()}}, +\code{\link[=StringToPhyDat]{StringToPhyDat()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/RightmostCharacter.Rd b/man/RightmostCharacter.Rd index 2b3ad8cec..e19b9fccb 100644 --- a/man/RightmostCharacter.Rd +++ b/man/RightmostCharacter.Rd @@ -23,11 +23,11 @@ RightmostCharacter("Hello, World!") } \seealso{ -Other string parsing functions: -\code{\link{EndSentence}()}, -\code{\link{MatchStrings}()}, -\code{\link{MorphoBankDecode}()}, -\code{\link{Unquote}()} +Other string parsing functions: +\code{\link[=EndSentence]{EndSentence()}}, +\code{\link[=MatchStrings]{MatchStrings()}}, +\code{\link[=MorphoBankDecode]{MorphoBankDecode()}}, +\code{\link[=Unquote]{Unquote()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/RoguePlot.Rd b/man/RoguePlot.Rd index 9d93ce725..b5fa8d812 100644 --- a/man/RoguePlot.Rd +++ b/man/RoguePlot.Rd @@ -109,9 +109,9 @@ PlotTools::SpectrumLegend( \insertAllCited{} } \seealso{ -Other consensus tree functions: -\code{\link{Consensus}()}, -\code{\link{ConsensusWithout}()} +Other consensus tree functions: +\code{\link[=Consensus]{Consensus()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/RootNode.Rd b/man/RootNode.Rd index 2d7e6c668..c5323ca46 100644 --- a/man/RootNode.Rd +++ b/man/RootNode.Rd @@ -31,19 +31,19 @@ Test whether a tree is rooted: \code{\link[=TreeIsRooted]{TreeIsRooted()}} \code{phangorn::getRoot()} -Other tree navigation: -\code{\link{AncestorEdge}()}, -\code{\link{CladeSizes}()}, -\code{\link{DescendantEdges}()}, -\code{\link{EdgeAncestry}()}, -\code{\link{EdgeDistances}()}, -\code{\link{ListAncestors}()}, -\code{\link{MRCA}()}, -\code{\link{MatchEdges}()}, -\code{\link{NDescendants}()}, -\code{\link{NodeDepth}()}, -\code{\link{NodeNumbers}()}, -\code{\link{NodeOrder}()} +Other tree navigation: +\code{\link[=AncestorEdge]{AncestorEdge()}}, +\code{\link[=CladeSizes]{CladeSizes()}}, +\code{\link[=DescendantEdges]{DescendantEdges()}}, +\code{\link[=EdgeAncestry]{EdgeAncestry()}}, +\code{\link[=EdgeDistances]{EdgeDistances()}}, +\code{\link[=ListAncestors]{ListAncestors()}}, +\code{\link[=MRCA]{MRCA()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NDescendants]{NDescendants()}}, +\code{\link[=NodeDepth]{NodeDepth()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=NodeOrder]{NodeOrder()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/RootTree.Rd b/man/RootTree.Rd index 890e0a44d..a178fe8c2 100644 --- a/man/RootTree.Rd +++ b/man/RootTree.Rd @@ -70,22 +70,22 @@ plot(RootOnNode(tree, 2)) \item \code{\link[ape:root]{ape::root()}} } -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/SampleOne.Rd b/man/SampleOne.Rd index 4e9ca55a0..9954b98b9 100644 --- a/man/SampleOne.Rd +++ b/man/SampleOne.Rd @@ -23,17 +23,17 @@ SampleOne(letters[1:4]) } \seealso{ -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/SortTree.Rd b/man/SortTree.Rd index c2d64f8a4..15443743d 100644 --- a/man/SortTree.Rd +++ b/man/SortTree.Rd @@ -67,22 +67,22 @@ based on the index of leaves. \code{\link[=sort.multiPhylo]{sort.multiPhylo()}} sorts a list of trees stored as a \code{multiPhylo} object. -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/SplitConsistent.Rd b/man/SplitConsistent.Rd index 285f7aa23..99213e725 100644 --- a/man/SplitConsistent.Rd +++ b/man/SplitConsistent.Rd @@ -33,10 +33,10 @@ SplitConsistent(splits1[[4]], splits2) SplitConflicts(splits1[[4]], list(splits1, splits2)) } \seealso{ -Other split manipulation functions: -\code{\link{DropTip}()}, -\code{\link{Subsplit}()}, -\code{\link{TrivialSplits}()} +Other split manipulation functions: +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=Subsplit]{Subsplit()}}, +\code{\link[=TrivialSplits]{TrivialSplits()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/SplitFrequency.Rd b/man/SplitFrequency.Rd index f3041386b..cb6d72731 100644 --- a/man/SplitFrequency.Rd +++ b/man/SplitFrequency.Rd @@ -64,17 +64,17 @@ LabelSplits(cons, splitFreqs, unit = "\%", } \seealso{ -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/SplitInformation.Rd b/man/SplitInformation.Rd index ddaf1c83c..e48748ffc 100644 --- a/man/SplitInformation.Rd +++ b/man/SplitInformation.Rd @@ -115,11 +115,11 @@ Sum the phylogenetic information content of splits within a tree: Sum the clustering information content of splits within a tree: \href{https://ms609.github.io/TreeDist/reference/TreeInfo.html}{\code{TreeDist::ClusteringInfo()}} -Other split information functions: -\code{\link{CharacterInformation}()}, -\code{\link{SplitMatchProbability}()}, -\code{\link{TreesMatchingSplit}()}, -\code{\link{UnrootedTreesMatchingSplit}()} +Other split information functions: +\code{\link[=CharacterInformation]{CharacterInformation()}}, +\code{\link[=SplitMatchProbability]{SplitMatchProbability()}}, +\code{\link[=TreesMatchingSplit]{TreesMatchingSplit()}}, +\code{\link[=UnrootedTreesMatchingSplit]{UnrootedTreesMatchingSplit()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/SplitMatchProbability.Rd b/man/SplitMatchProbability.Rd index 970ec5bdf..c81354dad 100644 --- a/man/SplitMatchProbability.Rd +++ b/man/SplitMatchProbability.Rd @@ -34,11 +34,11 @@ SplitMatchProbability(split1, split2) LnSplitMatchProbability(split1, split2) } \seealso{ -Other split information functions: -\code{\link{CharacterInformation}()}, -\code{\link{SplitInformation}()}, -\code{\link{TreesMatchingSplit}()}, -\code{\link{UnrootedTreesMatchingSplit}()} +Other split information functions: +\code{\link[=CharacterInformation]{CharacterInformation()}}, +\code{\link[=SplitInformation]{SplitInformation()}}, +\code{\link[=TreesMatchingSplit]{TreesMatchingSplit()}}, +\code{\link[=UnrootedTreesMatchingSplit]{UnrootedTreesMatchingSplit()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/Splits.Rd b/man/Splits.Rd index b72c6aa05..276160694 100644 --- a/man/Splits.Rd +++ b/man/Splits.Rd @@ -89,17 +89,17 @@ as.Splits("....**", letters[1:6]) } \seealso{ -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/SplitsInBinaryTree.Rd b/man/SplitsInBinaryTree.Rd index a7aa8bfdd..50f57f5d1 100644 --- a/man/SplitsInBinaryTree.Rd +++ b/man/SplitsInBinaryTree.Rd @@ -47,31 +47,31 @@ SplitsInBinaryTree(8) SplitsInBinaryTree(list(tree, tree)) } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/Stemwardness.Rd b/man/Stemwardness.Rd index af5cacc1b..f85bf120e 100644 --- a/man/Stemwardness.Rd +++ b/man/Stemwardness.Rd @@ -86,11 +86,11 @@ RootNodeDist(RootTree(pec8, "t3"), "t3") \insertAllCited{} } \seealso{ -Other tree characterization functions: -\code{\link{CladisticInfo}()}, -\code{\link{Consensus}()}, -\code{\link{J1Index}()}, -\code{\link{TotalCopheneticIndex}()} +Other tree characterization functions: +\code{\link[=CladisticInfo]{CladisticInfo()}}, +\code{\link[=Consensus]{Consensus()}}, +\code{\link[=J1Index]{J1Index()}}, +\code{\link[=TotalCopheneticIndex]{TotalCopheneticIndex()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/Subsplit.Rd b/man/Subsplit.Rd index 3d1296f54..2223b8b94 100644 --- a/man/Subsplit.Rd +++ b/man/Subsplit.Rd @@ -36,10 +36,10 @@ summary(Subsplit(splits, tips = letters[5:8], keepAll = FALSE)) \seealso{ \code{\link[=KeepTip]{KeepTip()}} is a less flexible but faster equivalent. -Other split manipulation functions: -\code{\link{DropTip}()}, -\code{\link{SplitConsistent}()}, -\code{\link{TrivialSplits}()} +Other split manipulation functions: +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=SplitConsistent]{SplitConsistent()}}, +\code{\link[=TrivialSplits]{TrivialSplits()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/Subtree.Rd b/man/Subtree.Rd index 0da4e5ea4..c2989a1a9 100644 --- a/man/Subtree.Rd +++ b/man/Subtree.Rd @@ -36,22 +36,22 @@ plot(Subtree(tree, 13)) } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{TipTimedTree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, \code{\link{TrivialTree}} } \author{ diff --git a/man/TipLabels.Rd b/man/TipLabels.Rd index e4bd2e937..a6c01f745 100644 --- a/man/TipLabels.Rd +++ b/man/TipLabels.Rd @@ -92,31 +92,31 @@ AllTipLabels(c(BalancedTree(4), PectinateTree(8))) } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TreeIsRooted}()}, -\code{\link{Treeness}()} - -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}}, +\code{\link[=Treeness]{Treeness()}} + +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipsInSplits}()}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/TipTimedTree.Rd b/man/TipTimedTree.Rd index b7f021909..8891fd5e8 100644 --- a/man/TipTimedTree.Rd +++ b/man/TipTimedTree.Rd @@ -36,34 +36,34 @@ tree <- BalancedTree(6) plot(TipTimedTree(tree, tipAge = 1:6, minEdge = 2)) } \seealso{ -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, \code{\link{TrivialTree}} } \concept{tree manipulation} diff --git a/man/TipsInSplits.Rd b/man/TipsInSplits.Rd index c194e9a6d..170875d87 100644 --- a/man/TipsInSplits.Rd +++ b/man/TipsInSplits.Rd @@ -57,16 +57,16 @@ LabelSplits(tree, TipsInSplits(splits), unit = " tips", frame = "none", } \seealso{ -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, \code{\link{match,Splits,Splits-method}}, -\code{\link{xor}()} +\code{\link[=xor]{xor()}} } \concept{Splits operations} diff --git a/man/TotalCopheneticIndex.Rd b/man/TotalCopheneticIndex.Rd index 7ad6c2176..686b4f943 100644 --- a/man/TotalCopheneticIndex.Rd +++ b/man/TotalCopheneticIndex.Rd @@ -81,10 +81,10 @@ TCIContext(5L) # Context for a tree with 5 leaves. provides an alternative implementation of this index and its predecessors. } -Other tree characterization functions: -\code{\link{CladisticInfo}()}, -\code{\link{Consensus}()}, -\code{\link{J1Index}()}, +Other tree characterization functions: +\code{\link[=CladisticInfo]{CladisticInfo()}}, +\code{\link[=Consensus]{Consensus()}}, +\code{\link[=J1Index]{J1Index()}}, \code{\link{Stemwardness}} } \author{ diff --git a/man/TreeIsRooted.Rd b/man/TreeIsRooted.Rd index 678c9616e..eb9436280 100644 --- a/man/TreeIsRooted.Rd +++ b/man/TreeIsRooted.Rd @@ -22,19 +22,19 @@ TreeIsRooted(UnrootTree(BalancedTree(6))) } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{Treeness}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=Treeness]{Treeness()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/TreeNumber.Rd b/man/TreeNumber.Rd index fafe20cf0..fbbbdd119 100644 --- a/man/TreeNumber.Rd +++ b/man/TreeNumber.Rd @@ -198,15 +198,15 @@ as.phylo(0:2, nTip = 6, tipLabels = letters[1:6]) Describe the shape of a tree topology, independent of leaf labels: \code{\link[=TreeShape]{TreeShape()}} -Other tree generation functions: -\code{\link{ConstrainedNJ}()}, +Other tree generation functions: +\code{\link[=ConstrainedNJ]{ConstrainedNJ()}}, \code{\link{GenerateTree}}, -\code{\link{NJTree}()}, +\code{\link[=NJTree]{NJTree()}}, \code{\link{TrivialTree}} -Other 'TreeNumber' utilities: -\code{\link{is.TreeNumber}()}, -\code{\link{print.TreeNumber}()} +Other 'TreeNumber' utilities: +\code{\link[=is.TreeNumber]{is.TreeNumber()}}, +\code{\link[=print.TreeNumber]{print.TreeNumber()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/TreeTools-package.Rd b/man/TreeTools-package.Rd index dd6ab74b7..478a80a40 100644 --- a/man/TreeTools-package.Rd +++ b/man/TreeTools-package.Rd @@ -30,6 +30,11 @@ Useful links: \author{ \strong{Maintainer}: Martin R. Smith \email{martin.smith@durham.ac.uk} (\href{https://orcid.org/0000-0001-5660-1727}{ORCID}) [copyright holder] +Authors: +\itemize{ + \item Martin R. Smith \email{martin.smith@durham.ac.uk} (\href{https://orcid.org/0000-0001-5660-1727}{ORCID}) [copyright holder] +} + Other contributors: \itemize{ \item Emmanuel Paradis (\href{https://orcid.org/0000-0003-3092-2199}{ORCID}) (ape library) [copyright holder] diff --git a/man/Treeness.Rd b/man/Treeness.Rd index 098d5913b..e03e0580c 100644 --- a/man/Treeness.Rd +++ b/man/Treeness.Rd @@ -36,19 +36,19 @@ Treeness(c(lowTree, highTree)) \insertAllCited{} } \seealso{ -Other tree properties: -\code{\link{Cherries}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{EdgeRatio}()}, -\code{\link{LongBranch}()}, -\code{\link{MatchEdges}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{NodeNumbers}()}, -\code{\link{PathLengths}()}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TreeIsRooted}()} +Other tree properties: +\code{\link[=Cherries]{Cherries()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=EdgeRatio]{EdgeRatio()}}, +\code{\link[=LongBranch]{LongBranch()}}, +\code{\link[=MatchEdges]{MatchEdges()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=NodeNumbers]{NodeNumbers()}}, +\code{\link[=PathLengths]{PathLengths()}}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TreeIsRooted]{TreeIsRooted()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/TreesMatchingSplit.Rd b/man/TreesMatchingSplit.Rd index ab70e5209..1f0685a5b 100644 --- a/man/TreesMatchingSplit.Rd +++ b/man/TreesMatchingSplit.Rd @@ -33,11 +33,11 @@ Log2TreesMatchingSplit(5, 6) } \seealso{ -Other split information functions: -\code{\link{CharacterInformation}()}, -\code{\link{SplitInformation}()}, -\code{\link{SplitMatchProbability}()}, -\code{\link{UnrootedTreesMatchingSplit}()} +Other split information functions: +\code{\link[=CharacterInformation]{CharacterInformation()}}, +\code{\link[=SplitInformation]{SplitInformation()}}, +\code{\link[=SplitMatchProbability]{SplitMatchProbability()}}, +\code{\link[=UnrootedTreesMatchingSplit]{UnrootedTreesMatchingSplit()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/TreesMatchingTree.Rd b/man/TreesMatchingTree.Rd index 6bc96526d..a501ee9b6 100644 --- a/man/TreesMatchingTree.Rd +++ b/man/TreesMatchingTree.Rd @@ -38,9 +38,9 @@ rootedTree <- AddTip(partiallyResolvedTree, where = 0) TreesMatchingTree(partiallyResolvedTree) } \seealso{ -Other tree information functions: -\code{\link{CladisticInfo}()}, -\code{\link{NRooted}()} +Other tree information functions: +\code{\link[=CladisticInfo]{CladisticInfo()}}, +\code{\link[=NRooted]{NRooted()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/TrivialSplits.Rd b/man/TrivialSplits.Rd index 23e4ab606..71280649e 100644 --- a/man/TrivialSplits.Rd +++ b/man/TrivialSplits.Rd @@ -36,10 +36,10 @@ TrivialSplits(efgh) summary(WithoutTrivialSplits(efgh)) } \seealso{ -Other split manipulation functions: -\code{\link{DropTip}()}, -\code{\link{SplitConsistent}()}, -\code{\link{Subsplit}()} +Other split manipulation functions: +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=SplitConsistent]{SplitConsistent()}}, +\code{\link[=Subsplit]{Subsplit()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/TrivialTree.Rd b/man/TrivialTree.Rd index 4f1281ed3..b617458eb 100644 --- a/man/TrivialTree.Rd +++ b/man/TrivialTree.Rd @@ -33,28 +33,28 @@ plot(SingleTaxonTree("root") + BalancedTree(4)) ZeroTaxonTree() } \seealso{ -Other tree manipulation: -\code{\link{AddTip}()}, -\code{\link{CollapseNode}()}, -\code{\link{ConsensusWithout}()}, -\code{\link{DropTip}()}, -\code{\link{ImposeConstraint}()}, -\code{\link{KeptPaths}()}, -\code{\link{KeptVerts}()}, -\code{\link{LeafLabelInterchange}()}, -\code{\link{MakeTreeBinary}()}, -\code{\link{Renumber}()}, -\code{\link{RenumberTips}()}, -\code{\link{RenumberTree}()}, -\code{\link{RootTree}()}, -\code{\link{SortTree}()}, -\code{\link{Subtree}()}, -\code{\link{TipTimedTree}()} +Other tree manipulation: +\code{\link[=AddTip]{AddTip()}}, +\code{\link[=CollapseNode]{CollapseNode()}}, +\code{\link[=ConsensusWithout]{ConsensusWithout()}}, +\code{\link[=DropTip]{DropTip()}}, +\code{\link[=ImposeConstraint]{ImposeConstraint()}}, +\code{\link[=KeptPaths]{KeptPaths()}}, +\code{\link[=KeptVerts]{KeptVerts()}}, +\code{\link[=LeafLabelInterchange]{LeafLabelInterchange()}}, +\code{\link[=MakeTreeBinary]{MakeTreeBinary()}}, +\code{\link[=Renumber]{Renumber()}}, +\code{\link[=RenumberTips]{RenumberTips()}}, +\code{\link[=RenumberTree]{RenumberTree()}}, +\code{\link[=RootTree]{RootTree()}}, +\code{\link[=SortTree]{SortTree()}}, +\code{\link[=Subtree]{Subtree()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}} -Other tree generation functions: -\code{\link{ConstrainedNJ}()}, +Other tree generation functions: +\code{\link[=ConstrainedNJ]{ConstrainedNJ()}}, \code{\link{GenerateTree}}, -\code{\link{NJTree}()}, +\code{\link[=NJTree]{NJTree()}}, \code{\link{TreeNumber}} } \concept{tree generation functions} diff --git a/man/Unquote.Rd b/man/Unquote.Rd index c71c75423..c22ad366c 100644 --- a/man/Unquote.Rd +++ b/man/Unquote.Rd @@ -20,11 +20,11 @@ Remove quotation marks from a string Unquote("'Hello World'") } \seealso{ -Other string parsing functions: -\code{\link{EndSentence}()}, -\code{\link{MatchStrings}()}, -\code{\link{MorphoBankDecode}()}, -\code{\link{RightmostCharacter}()} +Other string parsing functions: +\code{\link[=EndSentence]{EndSentence()}}, +\code{\link[=MatchStrings]{MatchStrings()}}, +\code{\link[=MorphoBankDecode]{MorphoBankDecode()}}, +\code{\link[=RightmostCharacter]{RightmostCharacter()}} } \author{ Martin R. Smith diff --git a/man/UnrootedTreesMatchingSplit.Rd b/man/UnrootedTreesMatchingSplit.Rd index 7249df4f0..663a5b7d4 100644 --- a/man/UnrootedTreesMatchingSplit.Rd +++ b/man/UnrootedTreesMatchingSplit.Rd @@ -35,11 +35,11 @@ UnrootedTreesMatchingSplit(3, 2, 1, 2) \insertAllCited{} } \seealso{ -Other split information functions: -\code{\link{CharacterInformation}()}, -\code{\link{SplitInformation}()}, -\code{\link{SplitMatchProbability}()}, -\code{\link{TreesMatchingSplit}()} +Other split information functions: +\code{\link[=CharacterInformation]{CharacterInformation()}}, +\code{\link[=SplitInformation]{SplitInformation()}}, +\code{\link[=SplitMatchProbability]{SplitMatchProbability()}}, +\code{\link[=TreesMatchingSplit]{TreesMatchingSplit()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/UnshiftTree.Rd b/man/UnshiftTree.Rd index 8bf649760..10356ec20 100644 --- a/man/UnshiftTree.Rd +++ b/man/UnshiftTree.Rd @@ -39,17 +39,17 @@ UnshiftTree(tree, tree) \code{\link[=c]{c()}} joins a tree or series of trees to a \code{multiPhylo} object, but loses names and does not handle lists of trees. -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/as.multiPhylo.Rd b/man/as.multiPhylo.Rd index f1ad7d3d7..15fd81f6d 100644 --- a/man/as.multiPhylo.Rd +++ b/man/as.multiPhylo.Rd @@ -38,16 +38,16 @@ data("Lobo") as.multiPhylo(Lobo.phy) } \seealso{ -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \concept{utility functions} diff --git a/man/doubleFactorials.Rd b/man/doubleFactorials.Rd index 461f13740..cb2acc866 100644 --- a/man/doubleFactorials.Rd +++ b/man/doubleFactorials.Rd @@ -18,8 +18,8 @@ and the logarithms of double factorials up to 50 000!!. 301!! is too large to store as an integer; use \code{logDoubleFactorials} instead. } \seealso{ -Other double factorials: -\code{\link{DoubleFactorial}()}, +Other double factorials: +\code{\link[=DoubleFactorial]{DoubleFactorial()}}, \code{\link{logDoubleFactorials}} } \concept{double factorials} diff --git a/man/is.TreeNumber.Rd b/man/is.TreeNumber.Rd index c7b62b60a..750e7dd8f 100644 --- a/man/is.TreeNumber.Rd +++ b/man/is.TreeNumber.Rd @@ -21,9 +21,9 @@ is.TreeNumber(FALSE) # FALSE is.TreeNumber(as.TreeNumber(BalancedTree(5))) # TRUE } \seealso{ -Other 'TreeNumber' utilities: +Other 'TreeNumber' utilities: \code{\link{TreeNumber}}, -\code{\link{print.TreeNumber}()} +\code{\link[=print.TreeNumber]{print.TreeNumber()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/logDoubleFactorials.Rd b/man/logDoubleFactorials.Rd index 4a37947b0..ab37ba34c 100644 --- a/man/logDoubleFactorials.Rd +++ b/man/logDoubleFactorials.Rd @@ -15,8 +15,8 @@ logDoubleFactorials double factorials up to 50 000!!. } \seealso{ -Other double factorials: -\code{\link{DoubleFactorial}()}, +Other double factorials: +\code{\link[=DoubleFactorial]{DoubleFactorial()}}, \code{\link{doubleFactorials}} } \concept{double factorials} diff --git a/man/match.Splits.Rd b/man/match.Splits.Rd index fa1012d84..cb2bba728 100644 --- a/man/match.Splits.Rd +++ b/man/match.Splits.Rd @@ -52,17 +52,17 @@ match(splits1, splits2) Corresponding base functions are documented in \code{\link[base:match]{match()}}. -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, -\code{\link{xor}()} +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, +\code{\link[=xor]{xor()}} } \concept{Splits operations} \keyword{methods} diff --git a/man/match.multiPhylo.Rd b/man/match.multiPhylo.Rd index ac103e8a0..e70bbdc9c 100644 --- a/man/match.multiPhylo.Rd +++ b/man/match.multiPhylo.Rd @@ -56,17 +56,17 @@ match(tree1, trees) Corresponding base functions are documented in \code{\link[base:match]{match()}}. -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, -\code{\link{sapply64}()}, -\code{\link{sort.multiPhylo}()} +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, +\code{\link[=sapply64]{sapply64()}}, +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \concept{utility functions} \keyword{methods} diff --git a/man/print.TreeNumber.Rd b/man/print.TreeNumber.Rd index ddb809646..c9e6cb70c 100644 --- a/man/print.TreeNumber.Rd +++ b/man/print.TreeNumber.Rd @@ -15,8 +15,8 @@ S3 method for objects of class \code{TreeNumber}. } \seealso{ -Other 'TreeNumber' utilities: +Other 'TreeNumber' utilities: \code{\link{TreeNumber}}, -\code{\link{is.TreeNumber}()} +\code{\link[=is.TreeNumber]{is.TreeNumber()}} } \concept{'TreeNumber' utilities} diff --git a/man/sapply64.Rd b/man/sapply64.Rd index e3fbe99f0..d1d958f37 100644 --- a/man/sapply64.Rd +++ b/man/sapply64.Rd @@ -63,17 +63,17 @@ replicate64(6, as.TreeNumber(RandomTree(6))) \seealso{ \code{\link[bit64]{integer64}()} -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sort.multiPhylo}()} +\code{\link[=sort.multiPhylo]{sort.multiPhylo()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/sort.multiPhylo.Rd b/man/sort.multiPhylo.Rd index 70b02a601..c6cbcdb35 100644 --- a/man/sort.multiPhylo.Rd +++ b/man/sort.multiPhylo.Rd @@ -38,17 +38,17 @@ if leaves are labelled with text). sort(as.phylo(5:0, 7)) } \seealso{ -Other utility functions: +Other utility functions: \code{\link{ClusterTable}}, \code{\link{ClusterTable-methods}}, -\code{\link{Hamming}()}, -\code{\link{MSTEdges}()}, -\code{\link{SampleOne}()}, -\code{\link{TipTimedTree}()}, -\code{\link{UnshiftTree}()}, -\code{\link{as.multiPhylo}()}, +\code{\link[=Hamming]{Hamming()}}, +\code{\link[=MSTEdges]{MSTEdges()}}, +\code{\link[=SampleOne]{SampleOne()}}, +\code{\link[=TipTimedTree]{TipTimedTree()}}, +\code{\link[=UnshiftTree]{UnshiftTree()}}, +\code{\link[=as.multiPhylo]{as.multiPhylo()}}, \code{\link{match,phylo,phylo-method}}, -\code{\link{sapply64}()} +\code{\link[=sapply64]{sapply64()}} } \author{ \href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} diff --git a/man/xor.Rd b/man/xor.Rd index 5bbffa994..2c385b1ea 100644 --- a/man/xor.Rd +++ b/man/xor.Rd @@ -16,16 +16,16 @@ xor(x, y) Exclusive OR operation } \seealso{ -Other Splits operations: -\code{\link{LabelSplits}()}, -\code{\link{NSplits}()}, -\code{\link{NTip}()}, -\code{\link{PolarizeSplits}()}, -\code{\link{SplitFrequency}()}, +Other Splits operations: +\code{\link[=LabelSplits]{LabelSplits()}}, +\code{\link[=NSplits]{NSplits()}}, +\code{\link[=NTip]{NTip()}}, +\code{\link[=PolarizeSplits]{PolarizeSplits()}}, +\code{\link[=SplitFrequency]{SplitFrequency()}}, \code{\link{Splits}}, -\code{\link{SplitsInBinaryTree}()}, -\code{\link{TipLabels}()}, -\code{\link{TipsInSplits}()}, +\code{\link[=SplitsInBinaryTree]{SplitsInBinaryTree()}}, +\code{\link[=TipLabels]{TipLabels()}}, +\code{\link[=TipsInSplits]{TipsInSplits()}}, \code{\link{match,Splits,Splits-method}} } \concept{Splits operations} From a2b103964e04e7d032335925cbf9693e4d1af252 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 18 May 2026 13:01:50 +0100 Subject: [PATCH 3/5] Complete impl --- NEWS.md | 13 +++++++++ R/parse_files.R | 35 +++++++++++++++++------- tests/testthat/test-parsers.R | 50 +++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 9 deletions(-) diff --git a/NEWS.md b/NEWS.md index 778afd2e5..475c8de4d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,16 @@ +# TreeTools 2.3.0.9000 (development) # + +## New functionality + +- `NexusTokensToInteger()` converts character data to integers, + mapping uncertain tokens to `NA`. + +## Fixes + +- `NexusTokens()` once again handles polymorphism tokens with internal + whitespace (e.g. `(1 2)`, `{0 1}`). + + # TreeTools 2.3.0 (2026-04-22) # ## Performance diff --git a/R/parse_files.R b/R/parse_files.R index e18df9f58..6914887d2 100644 --- a/R/parse_files.R +++ b/R/parse_files.R @@ -891,16 +891,28 @@ PhyDat <- function(dataset) { #' ambiguous (`?`), and inapplicable (`-`) tokens to `NA_integer_` or to the #' first/last state listed in the polymorphism, depending on `polymorphism`. #' -#' @param tokens Character matrix as returned by [`ReadCharacters()`], or a -#' character vector. +#' Only digit states `0`..`9` are recognised; non-digit symbols (and any +#' token whose interior contains no digits) become `NA_integer_`. +#' Polymorphism extraction (`polymorphism = "first"`/`"last"`) likewise +#' considers digits only. +#' +#' If `tokens` is a `phyDat` object it is first converted via +#' [`PhyDatToMatrix()`] with `ambigNA = TRUE, inappNA = TRUE`, so that +#' fully-ambiguous and inapplicable rows become `NA_integer_` and only +#' true partial polymorphisms are subject to the `polymorphism` rule. +#' +#' @param tokens Character matrix as returned by [`ReadCharacters()`], a +#' character vector as returned by [`NexusTokens()`], or a `phyDat` object. #' @param polymorphism Character string specifying how to handle polymorphic #' tokens such as `"(01)"` or `"{12}"`: #' \describe{ -#' \item{`"NA"` (default)}{Map to `NA_integer_`.} +#' \item{`"?"` (default)}{Treat as the NEXUS missing-data token: map to +#' `NA_integer_`.} #' \item{`"first"`}{Use the first state digit inside the brackets.} #' \item{`"last"`}{Use the last state digit inside the brackets.} #' } -#' Tokens `"?"` and `"-"` always map to `NA_integer_`. +#' Tokens `"?"` and `"-"` always map to `NA_integer_` regardless of +#' `polymorphism`. #' #' @return An integer matrix (or vector) with the same dimensions and #' `dimnames` as `tokens`. @@ -916,18 +928,23 @@ PhyDat <- function(dataset) { #' @template MRS #' @export NexusTokensToInteger <- function(tokens, - polymorphism = c("NA", "first", "last")) { + polymorphism = c("?", "first", "last")) { polymorphism <- match.arg(polymorphism) + if (inherits(tokens, "phyDat")) { + tokens <- PhyDatToMatrix(tokens, ambigNA = TRUE, inappNA = TRUE) + } at <- attributes(tokens) x <- as.character(tokens) result <- suppressWarnings(as.integer(x)) ambig <- is.na(result) & !is.na(x) & x != "?" & x != "-" - if (polymorphism != "NA" && any(ambig)) { - digits <- regmatches(x[ambig], - regexpr(if (polymorphism == "first") "\\d" else "\\d(?=[^\\d]*$)", - x[ambig], perl = TRUE)) + if (polymorphism != "?" && any(ambig)) { + pattern <- if (polymorphism == "first") "\\d" else "\\d(?=[^\\d]*$)" + m <- regexpr(pattern, x[ambig], perl = TRUE) + matched <- regmatches(x[ambig], m) + digits <- rep(NA_character_, sum(ambig)) + digits[m != -1L] <- matched result[ambig] <- suppressWarnings(as.integer(digits)) } diff --git a/tests/testthat/test-parsers.R b/tests/testthat/test-parsers.R index 85f3ac8e8..43cfe4407 100644 --- a/tests/testthat/test-parsers.R +++ b/tests/testthat/test-parsers.R @@ -77,6 +77,18 @@ BEGIN CHARACTERS; expect_equal(unname(readMulti["Taxon_B", 2]), "{01}") expect_equal(unname(readMulti["Taxon_A", 6]), "1") expect_equal(unname(readMulti["Taxon_B", 6]), "0") + + # Round-trip the ReadCharacters() matrix through NexusTokensToInteger(). + intMat <- NexusTokensToInteger(read) + expect_equal(dim(intMat), c(3L, 5L)) + expect_equal(unname(intMat["Taxon_A", 1]), 0L) + expect_equal(unname(intMat["Taxon_A", 2]), NA_integer_) # polymorphism -> ? + expect_equal(unname(intMat["Taxon_B", 2]), NA_integer_) # uncertainty -> ? + expect_equal(unname(intMat["Taxon_A", 4]), NA_integer_) # ? + expect_equal(unname(intMat["Taxon_A", 5]), NA_integer_) # - + expect_equal(unname(intMat["Taxon_C", 5]), 0L) + expect_equal(unname(NexusTokensToInteger(read, "first")["Taxon_A", 2]), 1L) + expect_equal(unname(NexusTokensToInteger(read, "last")["Taxon_A", 2]), 2L) }) test_that("NexusTokensToInteger() converts token matrix to integer", { @@ -108,6 +120,44 @@ test_that("NexusTokensToInteger() converts token matrix to integer", { expect_equal(unname(NexusTokensToInteger(tokens2)["T1", "C1"]), NA_integer_) expect_equal(unname(NexusTokensToInteger(tokens2, "first")["T1", "C1"]), 0L) expect_equal(unname(NexusTokensToInteger(tokens2, "last")["T1", "C1"]), 1L) + + # Named vector input (no dim attribute). + vec <- c(a = "0", b = "(12)", c = "?", d = "1") + vecOut <- NexusTokensToInteger(vec) + expect_null(dim(vecOut)) + expect_equal(names(vecOut), c("a", "b", "c", "d")) + expect_equal(unname(vecOut), c(0L, NA_integer_, NA_integer_, 1L)) + expect_equal(unname(NexusTokensToInteger(vec, "first")), c(0L, 1L, NA_integer_, 1L)) + expect_equal(unname(NexusTokensToInteger(vec, "last")), c(0L, 2L, NA_integer_, 1L)) + + # No-digit polymorphism token: must not crash, must yield NA in every mode. + noDigit <- matrix(c("(AB)", "0"), nrow = 1L, + dimnames = list("T", c("C1", "C2"))) + expect_silent(NexusTokensToInteger(noDigit)) + expect_equal(unname(NexusTokensToInteger(noDigit)["T", "C1"]), NA_integer_) + expect_equal(unname(NexusTokensToInteger(noDigit, "first")["T", "C1"]), + NA_integer_) + expect_equal(unname(NexusTokensToInteger(noDigit, "last")["T", "C1"]), + NA_integer_) + expect_equal(unname(NexusTokensToInteger(noDigit, "first")["T", "C2"]), 0L) + + # state.labels and other matrix attributes round-trip through the result. + tokens3 <- matrix(c("0", "(12)", "1"), nrow = 1L, + dimnames = list("Tax", c("C1", "C2", "C3"))) + attr(tokens3, "state.labels") <- list(c("absent", "present"), + c("a", "b", "c"), + c("absent", "present")) + out3 <- NexusTokensToInteger(tokens3) + expect_equal(attr(out3, "state.labels"), attr(tokens3, "state.labels")) + + # phyDat input routes through PhyDatToMatrix(ambigNA = TRUE, inappNA = TRUE). + phy <- MatrixToPhyDat(matrix(c("0", "(12)", "1", "?", "-"), + nrow = 1L, + dimnames = list("Tax", paste0("C", 1:5)))) + viaPhy <- NexusTokensToInteger(phy) + viaMat <- NexusTokensToInteger(PhyDatToMatrix(phy, ambigNA = TRUE, + inappNA = TRUE)) + expect_equal(unname(viaPhy), unname(viaMat)) }) test_that("NexusTokens() fails gracefully", { From 8124aaa43f0f6e2ccbea20d901356fabe3271dc4 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 18 May 2026 13:08:47 +0100 Subject: [PATCH 4/5] Merge origin/main into fix-polymorphism-whitespace Resolve conflicts from PR #268 (TNT parser fixes) landing on main while this branch was open: - DESCRIPTION: bump to 2.3.0.9002 (past main's 9001); drop duplicate Config/roxygen2/version line introduced by the merge. - NEWS.md: consolidate dev entries from both sides under the new header. - inst/extdata/tests/tnt-*.tnt, tests/testthat/test-ReadTntTree.R: keep main's versions; the branch's earlier deletions were premature. - man/*.Rd: regenerated via devtools::document() so @family references include both NexusTokensToInteger() (this branch) and the TNT additions from main. R/parse_files.R auto-merged cleanly. Full devtools::test() green. --- DESCRIPTION | 1 - man/Decompose.Rd | 1 + man/MatrixToPhyDat.Rd | 1 + man/PhyToString.Rd | 1 + man/Reweight.Rd | 1 + 5 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7f6ac8456..2ecffdba1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -74,4 +74,3 @@ Encoding: UTF-8 Language: en-GB VignetteBuilder: knitr Roxygen: list(markdown = TRUE) -Config/roxygen2/version: 8.0.0 diff --git a/man/Decompose.Rd b/man/Decompose.Rd index 24a69d1f6..1461d624e 100644 --- a/man/Decompose.Rd +++ b/man/Decompose.Rd @@ -73,6 +73,7 @@ NumberOfChars(decomposed) # 116 characters in decomposed \seealso{ Other phylogenetic matrix conversion functions: \code{\link[=MatrixToPhyDat]{MatrixToPhyDat()}}, +\code{\link[=NexusTokensToInteger]{NexusTokensToInteger()}}, \code{\link[=Reweight]{Reweight()}}, \code{\link[=StringToPhyDat]{StringToPhyDat()}} } diff --git a/man/MatrixToPhyDat.Rd b/man/MatrixToPhyDat.Rd index ea3b4645d..b57517b05 100644 --- a/man/MatrixToPhyDat.Rd +++ b/man/MatrixToPhyDat.Rd @@ -68,6 +68,7 @@ head(PhyDatToMatrix(Lobo.phy)[, 91:93]) \seealso{ Other phylogenetic matrix conversion functions: \code{\link[=Decompose]{Decompose()}}, +\code{\link[=NexusTokensToInteger]{NexusTokensToInteger()}}, \code{\link[=Reweight]{Reweight()}}, \code{\link[=StringToPhyDat]{StringToPhyDat()}} } diff --git a/man/PhyToString.Rd b/man/PhyToString.Rd index ec58c9f6a..021b30e3d 100644 --- a/man/PhyToString.Rd +++ b/man/PhyToString.Rd @@ -97,6 +97,7 @@ PhyToString(phyDat, concatenate = FALSE) Other phylogenetic matrix conversion functions: \code{\link[=Decompose]{Decompose()}}, \code{\link[=MatrixToPhyDat]{MatrixToPhyDat()}}, +\code{\link[=NexusTokensToInteger]{NexusTokensToInteger()}}, \code{\link[=Reweight]{Reweight()}} } \author{ diff --git a/man/Reweight.Rd b/man/Reweight.Rd index 6bf37e24e..db3d6e894 100644 --- a/man/Reweight.Rd +++ b/man/Reweight.Rd @@ -69,6 +69,7 @@ Reweight(dat, c("3" = 0, "2" = 2)) Other phylogenetic matrix conversion functions: \code{\link[=Decompose]{Decompose()}}, \code{\link[=MatrixToPhyDat]{MatrixToPhyDat()}}, +\code{\link[=NexusTokensToInteger]{NexusTokensToInteger()}}, \code{\link[=StringToPhyDat]{StringToPhyDat()}} } \author{ From db1238f8e8a8ebca1f3da58185978196632e436b Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 18 May 2026 13:16:56 +0100 Subject: [PATCH 5/5] sp --- NEWS.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 6428c7ebb..cb2166e7e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,7 +5,7 @@ - `NexusTokensToInteger()` converts character data to integers, mapping uncertain tokens to `NA`. - `ReadTntCharacters()` attaches an `xgroup` attribute (factor) when a TNT - `xgroup` partition block is present, replacing the standalone `ReadXgroup()`. + `xgroup` partition block is present, replacing the stand-alone `ReadXgroup()`. ## Fixes @@ -19,8 +19,7 @@ - `ReadTntCharacters()` now handles multi-line comments, bare `&` continuations, `@taxonomy` suffixes, name-only taxon lines, mid-line `xread`, smart-quote - names (Windows-1252), and packed multi-taxon lines; all 13 Goloboff (2019) - corpus files parse cleanly. + names (Windows-1252), and packed multi-taxon lines. ## Performance