diff --git a/NAMESPACE b/NAMESPACE index d0dac537f..e79c399f0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -51,8 +51,6 @@ S3method(DropTip,Splits) S3method(DropTip,list) S3method(DropTip,multiPhylo) S3method(DropTip,phylo) -S3method(EnforceOutgroup,character) -S3method(EnforceOutgroup,phylo) S3method(KeepTip,"NULL") S3method(KeepTip,Splits) S3method(KeepTip,list) @@ -264,7 +262,6 @@ export(AddTip) export(AddTipEverywhere) export(AddUnconstrained) export(AllAncestors) -export(AllDescendantEdges) export(AllTipLabels) export(AncestorEdge) export(ApePostorder) @@ -293,7 +290,6 @@ export(DropTipPhylo) export(EdgeAncestry) export(EdgeDistances) export(EndSentence) -export(EnforceOutgroup) export(ExtractTaxa) export(Hamming) export(IC1Spr) @@ -375,8 +371,6 @@ export(PhyDatToMatrix) export(PhyDatToString) export(PhyToString) export(PhydatToString) -export(PhylogeneticInfo) -export(PhylogeneticInformation) export(PolarizeSplits) export(Postorder) export(PostorderOrder) @@ -411,7 +405,6 @@ export(SampleOne) export(SingleTaxonTree) export(SisterSize) export(SortTree) -export(SpectrumLegend) export(SplitConflicts) export(SplitConsistent) export(SplitFrequency) @@ -476,7 +469,6 @@ importFrom(RCurl,url.exists) importFrom(Rdpack,reprompt) importFrom(ape,all.equal.phylo) importFrom(ape,as.phylo) -importFrom(ape,bind.tree) importFrom(ape,cophenetic.phylo) importFrom(ape,edgelabels) importFrom(ape,is.rooted) @@ -495,10 +487,6 @@ importFrom(grDevices,rgb) importFrom(graphics,legend) importFrom(graphics,lines) importFrom(graphics,par) -importFrom(graphics,segments) -importFrom(graphics,strheight) -importFrom(graphics,strwidth) -importFrom(graphics,text) importFrom(methods,new) importFrom(methods,setClass) importFrom(methods,setMethod) diff --git a/NEWS.md b/NEWS.md index 26e01e2bf..22ac2dfd9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,7 +7,9 @@ - Require R 3.6 - Remove R.cache dependency: `UnrootedKeys()` now uses a native cache implementation. - Remove deprecated functions `TreeSplits()`, `ForestSplits()`, `SplitNumber()`, - `in.Splits()`. + `in.Splits()`, `AllDescendantEdges()`, `PhylogeneticInfo()`, + `.EnforceOutgroup()`, `SpectrumLegend()`. +- Remove deprecated C++ macro `TREETOOLS_SPLITLIST_INIT`. # TreeTools 1.16.1 (2025-08-24) # diff --git a/R/RoguePlot.R b/R/RoguePlot.R index e0e85b03a..4be4eaba7 100644 --- a/R/RoguePlot.R +++ b/R/RoguePlot.R @@ -247,7 +247,7 @@ RoguePlot <- function(trees, tip, p = 1, plot = TRUE, fat, thin), ...) if (legend != "none") { - PlotTools::SpectrumLegend( + SpectrumLegend( legend, bty = "n", palette = pal, diff --git a/R/helper_functions.R b/R/helper_functions.R index 8a9a668cc..aee7a1ef8 100644 --- a/R/helper_functions.R +++ b/R/helper_functions.R @@ -98,92 +98,3 @@ replicate64 <- function(n, expr, simplify = "array") { sapply64(integer(n), eval.parent(substitute(function(...) expr)), simplify = simplify) } - -#nocov start -#' Produce a legend for continuous gradient scales -#' -#' Prints an annotated vertical bar coloured according to a continuous palette. -#' -#' This function is now deprecated; it has been superseded by the more capable -#' [`PlotTools::SpectrumLegend()`] and will be removed in a future release. -# Deprecation notice added in TreeTools 1.9.2 (2023-04-25) -#' -#' @param x0,y0,x1,y1 Coordinates of the bottom-left and top-right end of the -#' bar. -#' @param absolute Logical specifying whether `x` and `y` values denote -#' coordinates (`TRUE`) or relative position, where (0, 0) denotes the -#' bottom-left of the plot area and (1, 1) the top right. -#' @param legend Character vector with which to label points on `palette`. -#' @param palette Colour palette to depict. -#' @param lwd,lty,lend Additional parameters to [`segments()`], -#' controlling line style. -#' @param cex Character expansion factor relative to current `par("cex")`. -#' @param text.col Colour used for the legend text. -#' @param font,text.font Font used for the legend text; see [`text()`]. -#' @param title Text to display -#' @param title.col Colour for title; defaults to `text.col[1]`. -#' @param title.cex Expansion factor(s) for the title, defaults to `cex[1]`. -#' @param title.adj Horizontal adjustment for title: see the help for -#' `par("adj")`. -#' @param title.font Font used for the legend title. -#' @param pos,\dots Additional parameters to [`text()`]. -#' -#' @template MRS -#' @importFrom graphics segments strheight strwidth text -#' @keywords internal -#' @export -SpectrumLegend <- function(x0 = 0.05, y0 = 0.05, - x1 = x0, y1 = y0 + 0.2, - absolute = FALSE, - legend = character(0), palette, - lwd = 4, lty = 1, lend = "square", cex = 1, - text.col = par("col"), - font = NULL, text.font = font, - title = NULL, title.col = text.col[1], - title.cex = cex[1], title.adj = 0.5, title.font = 2, - pos = 4, - ...) { - - .Deprecated("PlotTools::SpectrumLegend", package = "PlotTools") - - nCol <- length(palette) - - if (!absolute) { - corners <- par("usr") # x0 x1 y0 y1 - xRange <- corners[2] - corners[1] - yRange <- corners[4] - corners[3] - - # Order is important: lazy evaluation will set x1 = modified x0 - x1 <- corners[1] + (x1 * xRange) - x0 <- corners[1] + (x0 * xRange) - y1 <- corners[3] + (y1 * yRange) - y0 <- corners[3] + (y0 * yRange) - } - - segX <- x0 + ((x1 - x0) * 0:nCol / nCol) - segY <- y0 + ((y1 - y0) * 0:nCol / nCol) - - nPlus1 <- nCol + 1L - segments(segX[-nPlus1], segY[-nPlus1], - segX[-1], segY[-1], - col = palette, - lwd = lwd, lty = lty, lend = lend) - text(seq(x0, x1, length.out = length(legend)), - seq(y0, y1, length.out = length(legend)), - col = text.col, - cex = cex, - font = text.font, - legend, pos = pos, ...) - if (!is.null(title)) { - text(mean(x0, x1) + (max(strwidth(legend)) / ifelse(pos == 2, -2, 2)), - max(y0, y1) + prod( - par("lheight"), - strheight("") - ), - title, - pos = 3, - cex = title.cex, adj = title.adj, font = title.font, col = title.col, - ...) - } -} -#nocov end diff --git a/R/match.R b/R/match.R index 5ff3bba3c..840bec1d4 100644 --- a/R/match.R +++ b/R/match.R @@ -6,9 +6,6 @@ #' a logical vector indicating whether there is a match or not for each #' split in its left operand. #' -#' `in.Splits()` is an alias for `%in%`, included for backwards compatibility. -#' It is deprecated and will be removed in a future release. -#' #' @param x,table Object of class `Splits`. #' @param nomatch Integer value that will be used in place of `NA` in the case #' where no match is found. diff --git a/R/tree_descendants.R b/R/tree_descendants.R index 322241057..56f94027c 100644 --- a/R/tree_descendants.R +++ b/R/tree_descendants.R @@ -100,19 +100,6 @@ DescendantTips <- function(parent, child, edge = NULL, } } -#' @rdname DescendantEdges -#' -#' @return `AllDescendantEdges()` is deprecated; use `DescendantEdges()` -#' instead. -#' It returns a matrix of class logical, with row _N_ specifying whether each -#' edge is a descendant of edge _N_ (or the edge itself). -#' -#' @export -AllDescendantEdges <- function(parent, child, nEdge = length(parent)) { - .Deprecated("DescendantEdges") - .AllDescendantEdges(parent, child, nEdge) -} - .AllDescendantEdges <- function(parent, child, nEdge = length(parent)) { ret <- diag(nEdge) == 1 blankLogical <- logical(nEdge) diff --git a/R/tree_generation.R b/R/tree_generation.R index 8011eed45..5dcdd4dd8 100644 --- a/R/tree_generation.R +++ b/R/tree_generation.R @@ -482,75 +482,7 @@ ConstrainedNJ <- function(dataset, constraint, weight = 1L, tree } -#nocov begin -#' Generate a tree with a specified outgroup -#' -#' **Deprecated.** This function will be removed in a future version of -#' \pkg{TreeTools}. -#' Use `RootTree()` instead. -#' -#' Given a tree or a list of taxa, `EnforceOutgroup()` rearranged the ingroup -#' and outgroup taxa such that the two are sister taxa across the root, without -#' changing the relationships within the ingroup or within the outgroup. -#' -#' @param tree Either a tree of class \code{phylo}; or (for `EnforceOutgroup()`) -#' a character vector listing the names of all the taxa in the tree, from which -#' a random tree will be generated. -#' @param outgroup Character vector containing the names of taxa to include in -#' the outgroup. -#' -#' @return `EnforceOutgroup()` returned a tree of class `phylo` where all -#' outgroup taxa are sister to all remaining taxa, without modifying the -#' ingroup topology. -#' -# @examples -# tree <- EnforceOutgroup(letters[1:9], letters[1:3]) -# plot(tree) -# -#' @seealso For a more robust implementation, see [`RootTree()`], which will -#' eventually replace this function -#' ([#30](https://github.com/ms609/TreeTools/issues/30)). -#' -#' @template MRS -#' @family tree manipulation -#' @export -EnforceOutgroup <- function(tree, outgroup) UseMethod("EnforceOutgroup") - -#' @importFrom ape bind.tree -.EnforceOutgroup <- function(tree, outgroup, taxa) { - .Deprecated("RootTree") - if (length(outgroup) == 1L) { - return(RootTree(tree, outgroup)) - } - - ingroup <- taxa[!(taxa %fin% outgroup)] - if (!all(outgroup %fin% taxa) || - length(ingroup) + length(outgroup) != length(taxa)) { - stop("All outgroup taxa must occur in tree") - } - - ingroup.branch <- DropTip(tree, outgroup) - outgroup.branch <- DropTip(tree, ingroup) - - result <- RootTree(bind.tree(outgroup.branch, ingroup.branch, 0, 1), - outgroup) - RenumberTips(Renumber(result), taxa) -} - -#' @rdname EnforceOutgroup -#' @export -EnforceOutgroup.phylo <- function(tree, outgroup) { - .EnforceOutgroup(tree, outgroup, tree[["tip.label"]]) -} - -#' @rdname EnforceOutgroup -#' @export -EnforceOutgroup.character <- function(tree, outgroup) { - taxa <- tree - .EnforceOutgroup(RandomTree(taxa, taxa[1]), outgroup, taxa) -} -#nocov end - +# Wrap an edge matrix as a tree in preorder .PreorderTree <- function(edge, tip.label, Nnode = dim(edge)[[1]] + 1 - length(tip.label)) { diff --git a/R/tree_information.R b/R/tree_information.R index f84a829d3..dbfc5e199 100644 --- a/R/tree_information.R +++ b/R/tree_information.R @@ -78,13 +78,6 @@ Log2TreesMatchingTree <- function(tree) { #' @export CladisticInfo <- function(x) UseMethod("CladisticInfo") -#' @rdname CladisticInfo -#' @export -PhylogeneticInfo <- function(x) { # nocov start - .Deprecated("CladisticInfo()") - UseMethod("CladisticInfo") -} # nocov end - #' @rdname CladisticInfo #' @export CladisticInfo.phylo <- function(x) { @@ -105,10 +98,6 @@ CladisticInfo.list <- function(x) vapply(x, CladisticInfo, 0) #' @export CladisticInfo.multiPhylo <- CladisticInfo.list - -#' @rdname CladisticInfo -#' @export -PhylogeneticInformation <- PhylogeneticInfo #' @rdname CladisticInfo #' @export CladisticInformation <- CladisticInfo diff --git a/R/tree_numbering.R b/R/tree_numbering.R index e746a83af..40a1fdc27 100644 --- a/R/tree_numbering.R +++ b/R/tree_numbering.R @@ -74,12 +74,11 @@ RenumberTree <- function(parent, child, weight) { #' @rdname Reorder #' -#' @param \dots Deprecated; included for compatibility with previous versions. #' @return `RenumberEdges()` formats the output of `RenumberTree()` into a list #' whose two entries correspond to the new parent and child vectors, #' in preorder. #' @export -RenumberEdges <- function(parent, child, ...) { +RenumberEdges <- function(parent, child) { oenn <- .Call(`_TreeTools_preorder_edges_and_nodes`, parent, child) # Return: diff --git a/R/tree_shape.R b/R/tree_shape.R index 3d330bac5..dd5fe6e0c 100644 --- a/R/tree_shape.R +++ b/R/tree_shape.R @@ -237,7 +237,7 @@ UnrootedTreeKey <- function(tree, asInteger = FALSE) { .unrooted_keys_cache <- new.env(parent = emptyenv()) #' @rdname TreeShape -#' @param \dots Depreciated (2025-09); retained for backward compatibility. +#' @param \dots Deprecated (2025-09); retained for backward compatibility. #' @return `UnrootedKeys()` returns a vector of integers corresponding to the #' keys (not shape numbers) of unrooted tree shapes with `nTip` tips. #' It is a wrapper to `.UnrootedKeys()`, with memoization, meaning that results diff --git a/inst/include/TreeTools/SplitList.h b/inst/include/TreeTools/SplitList.h index f0cbc6fce..4e83cb538 100644 --- a/inst/include/TreeTools/SplitList.h +++ b/inst/include/TreeTools/SplitList.h @@ -25,18 +25,6 @@ using splitbit = uint_fast64_t; splitbit(x(split, ((bin) * input_bins_per_bin) + (offset))) #define INBIN(r_bin, bin) ((INSUBBIN((bin), (r_bin))) << (R_BIN_SIZE * (r_bin))) -// Retained for backward compatibility; not required since 1.15.0.9006 -#define TREETOOLS_SPLITLIST_INIT __attribute__((constructor)) \ -void _treetools_initialize_bitcounts() { \ - for (int i = 65536; i--; ) { \ - int16 n_bits = 0; \ - for (int j = 16; j--; ) { \ - if (i & (1 << j)) n_bits += 1; \ - } \ - TreeTools::bitcounts[i] = n_bits; \ - } \ -} \ - namespace TreeTools { constexpr int input_bins_per_bin = SL_BIN_SIZE / R_BIN_SIZE; diff --git a/man/AddTip.Rd b/man/AddTip.Rd index 47923431a..9ec98e237 100644 --- a/man/AddTip.Rd +++ b/man/AddTip.Rd @@ -118,7 +118,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/CladisticInfo.Rd b/man/CladisticInfo.Rd index 6b559b892..eefd6d4b0 100644 --- a/man/CladisticInfo.Rd +++ b/man/CladisticInfo.Rd @@ -2,19 +2,15 @@ % Please edit documentation in R/tree_information.R \name{CladisticInfo} \alias{CladisticInfo} -\alias{PhylogeneticInfo} \alias{CladisticInfo.phylo} \alias{CladisticInfo.Splits} \alias{CladisticInfo.list} \alias{CladisticInfo.multiPhylo} -\alias{PhylogeneticInformation} \alias{CladisticInformation} \title{Cladistic information content of a tree} \usage{ CladisticInfo(x) -PhylogeneticInfo(x) - \method{CladisticInfo}{phylo}(x) \method{CladisticInfo}{Splits}(x) @@ -23,8 +19,6 @@ PhylogeneticInfo(x) \method{CladisticInfo}{multiPhylo}(x) -PhylogeneticInformation(x) - CladisticInformation(x) } \arguments{ diff --git a/man/CollapseNode.Rd b/man/CollapseNode.Rd index b7da762a9..38f0ab27b 100644 --- a/man/CollapseNode.Rd +++ b/man/CollapseNode.Rd @@ -61,7 +61,6 @@ Other tree manipulation: \code{\link{AddTip}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/ConsensusWithout.Rd b/man/ConsensusWithout.Rd index 7bcb89177..8cc77fe93 100644 --- a/man/ConsensusWithout.Rd +++ b/man/ConsensusWithout.Rd @@ -65,7 +65,6 @@ Other tree manipulation: \code{\link{AddTip}()}, \code{\link{CollapseNode}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/DescendantEdges.Rd b/man/DescendantEdges.Rd index 9cbc2ff0a..970674d73 100644 --- a/man/DescendantEdges.Rd +++ b/man/DescendantEdges.Rd @@ -3,7 +3,6 @@ \name{DescendantEdges} \alias{DescendantEdges} \alias{DescendantTips} -\alias{AllDescendantEdges} \title{Identify descendant edges} \usage{ DescendantEdges( @@ -16,8 +15,6 @@ DescendantEdges( ) DescendantTips(parent, child, edge = NULL, node = NULL, nEdge = length(parent)) - -AllDescendantEdges(parent, child, nEdge = length(parent)) } \arguments{ \item{parent}{Integer vector corresponding to the first column of the edge @@ -48,11 +45,6 @@ or one of its descendants. \code{DescendantTips()} returns a logical vector stating whether each leaf in turn is a descendant of the specified edge. - -\code{AllDescendantEdges()} is deprecated; use \code{DescendantEdges()} -instead. -It returns a matrix of class logical, with row \emph{N} specifying whether each -edge is a descendant of edge \emph{N} (or the edge itself). } \description{ \code{DescendantEdges()} efficiently identifies edges that are "descended" from diff --git a/man/DropTip.Rd b/man/DropTip.Rd index 173e2bda4..fc9debfaa 100644 --- a/man/DropTip.Rd +++ b/man/DropTip.Rd @@ -113,7 +113,6 @@ Other tree manipulation: \code{\link{AddTip}()}, \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/EnforceOutgroup.Rd b/man/EnforceOutgroup.Rd deleted file mode 100644 index 28c740aec..000000000 --- a/man/EnforceOutgroup.Rd +++ /dev/null @@ -1,66 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/tree_generation.R -\name{EnforceOutgroup} -\alias{EnforceOutgroup} -\alias{EnforceOutgroup.phylo} -\alias{EnforceOutgroup.character} -\title{Generate a tree with a specified outgroup} -\usage{ -EnforceOutgroup(tree, outgroup) - -\method{EnforceOutgroup}{phylo}(tree, outgroup) - -\method{EnforceOutgroup}{character}(tree, outgroup) -} -\arguments{ -\item{tree}{Either a tree of class \code{phylo}; or (for \code{EnforceOutgroup()}) -a character vector listing the names of all the taxa in the tree, from which -a random tree will be generated.} - -\item{outgroup}{Character vector containing the names of taxa to include in -the outgroup.} -} -\value{ -\code{EnforceOutgroup()} returned a tree of class \code{phylo} where all -outgroup taxa are sister to all remaining taxa, without modifying the -ingroup topology. -} -\description{ -\strong{Deprecated.} This function will be removed in a future version of -\pkg{TreeTools}. -Use \code{RootTree()} instead. -} -\details{ -Given a tree or a list of taxa, \code{EnforceOutgroup()} rearranged the ingroup -and outgroup taxa such that the two are sister taxa across the root, without -changing the relationships within the ingroup or within the outgroup. -} -\seealso{ -For a more robust implementation, see \code{\link[=RootTree]{RootTree()}}, which will -eventually replace this function -(\href{https://github.com/ms609/TreeTools/issues/30}{#30}). - -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}()}, -\code{\link{TrivialTree}} -} -\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{tree manipulation} diff --git a/man/ImposeConstraint.Rd b/man/ImposeConstraint.Rd index a5039f5ad..f74a1438b 100644 --- a/man/ImposeConstraint.Rd +++ b/man/ImposeConstraint.Rd @@ -54,7 +54,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, \code{\link{LeafLabelInterchange}()}, diff --git a/man/KeptPaths.Rd b/man/KeptPaths.Rd index 3430770fd..8ccf292af 100644 --- a/man/KeptPaths.Rd +++ b/man/KeptPaths.Rd @@ -46,7 +46,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptVerts}()}, \code{\link{LeafLabelInterchange}()}, diff --git a/man/KeptVerts.Rd b/man/KeptVerts.Rd index 477dfb36a..9c3a53914 100644 --- a/man/KeptVerts.Rd +++ b/man/KeptVerts.Rd @@ -49,7 +49,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{LeafLabelInterchange}()}, diff --git a/man/LeafLabelInterchange.Rd b/man/LeafLabelInterchange.Rd index 378ad4ab8..724f58530 100644 --- a/man/LeafLabelInterchange.Rd +++ b/man/LeafLabelInterchange.Rd @@ -39,7 +39,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/MakeTreeBinary.Rd b/man/MakeTreeBinary.Rd index 74223c947..9de537e87 100644 --- a/man/MakeTreeBinary.Rd +++ b/man/MakeTreeBinary.Rd @@ -34,7 +34,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/Renumber.Rd b/man/Renumber.Rd index 24a276778..6b8e435a7 100644 --- a/man/Renumber.Rd +++ b/man/Renumber.Rd @@ -39,7 +39,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/RenumberTips.Rd b/man/RenumberTips.Rd index bbafed0a1..c7f48bfe5 100644 --- a/man/RenumberTips.Rd +++ b/man/RenumberTips.Rd @@ -46,7 +46,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/Reorder.Rd b/man/Reorder.Rd index 3b99878d5..210be3e78 100644 --- a/man/Reorder.Rd +++ b/man/Reorder.Rd @@ -46,7 +46,7 @@ \usage{ RenumberTree(parent, child, weight) -RenumberEdges(parent, child, ...) +RenumberEdges(parent, child) Cladewise(tree, nTip, edge) @@ -136,8 +136,6 @@ matrix of a tree of class \code{\link[ape]{phylo}}, i.e. \item{weight}{Optional vector specifying the weight of each edge, corresponding to the \code{edge.length} property of a \code{phylo} object.} -\item{\dots}{Deprecated; included for compatibility with previous versions.} - \item{tree}{A tree of class \code{\link[ape:read.tree]{phylo}}.} \item{nTip}{Integer specifying number of tips (leaves).} @@ -250,7 +248,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/RootTree.Rd b/man/RootTree.Rd index d075b3d89..890e0a44d 100644 --- a/man/RootTree.Rd +++ b/man/RootTree.Rd @@ -75,7 +75,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/SortTree.Rd b/man/SortTree.Rd index 59f88ceae..c2d64f8a4 100644 --- a/man/SortTree.Rd +++ b/man/SortTree.Rd @@ -72,7 +72,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/SpectrumLegend.Rd b/man/SpectrumLegend.Rd deleted file mode 100644 index d39a70efa..000000000 --- a/man/SpectrumLegend.Rd +++ /dev/null @@ -1,76 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper_functions.R -\name{SpectrumLegend} -\alias{SpectrumLegend} -\title{Produce a legend for continuous gradient scales} -\usage{ -SpectrumLegend( - x0 = 0.05, - y0 = 0.05, - x1 = x0, - y1 = y0 + 0.2, - absolute = FALSE, - legend = character(0), - palette, - lwd = 4, - lty = 1, - lend = "square", - cex = 1, - text.col = par("col"), - font = NULL, - text.font = font, - title = NULL, - title.col = text.col[1], - title.cex = cex[1], - title.adj = 0.5, - title.font = 2, - pos = 4, - ... -) -} -\arguments{ -\item{x0, y0, x1, y1}{Coordinates of the bottom-left and top-right end of the -bar.} - -\item{absolute}{Logical specifying whether \code{x} and \code{y} values denote -coordinates (\code{TRUE}) or relative position, where (0, 0) denotes the -bottom-left of the plot area and (1, 1) the top right.} - -\item{legend}{Character vector with which to label points on \code{palette}.} - -\item{palette}{Colour palette to depict.} - -\item{lwd, lty, lend}{Additional parameters to \code{\link[=segments]{segments()}}, -controlling line style.} - -\item{cex}{Character expansion factor relative to current \code{par("cex")}.} - -\item{text.col}{Colour used for the legend text.} - -\item{font, text.font}{Font used for the legend text; see \code{\link[=text]{text()}}.} - -\item{title}{Text to display} - -\item{title.col}{Colour for title; defaults to \code{text.col[1]}.} - -\item{title.cex}{Expansion factor(s) for the title, defaults to \code{cex[1]}.} - -\item{title.adj}{Horizontal adjustment for title: see the help for -\code{par("adj")}.} - -\item{title.font}{Font used for the legend title.} - -\item{pos, \dots}{Additional parameters to \code{\link[=text]{text()}}.} -} -\description{ -Prints an annotated vertical bar coloured according to a continuous palette. -} -\details{ -This function is now deprecated; it has been superseded by the more capable -\code{\link[PlotTools:SpectrumLegend]{PlotTools::SpectrumLegend()}} and will be removed in a future release. -} -\author{ -\href{https://orcid.org/0000-0001-5660-1727}{Martin R. Smith} -(\href{mailto:martin.smith@durham.ac.uk}{martin.smith@durham.ac.uk}) -} -\keyword{internal} diff --git a/man/Subtree.Rd b/man/Subtree.Rd index 57fda5c15..0da4e5ea4 100644 --- a/man/Subtree.Rd +++ b/man/Subtree.Rd @@ -41,7 +41,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/TipTimedTree.Rd b/man/TipTimedTree.Rd index ecb23f4a4..b7f021909 100644 --- a/man/TipTimedTree.Rd +++ b/man/TipTimedTree.Rd @@ -53,7 +53,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/TreeShape.Rd b/man/TreeShape.Rd index 6fee3bd13..2fdd9f6bd 100644 --- a/man/TreeShape.Rd +++ b/man/TreeShape.Rd @@ -60,7 +60,7 @@ in a tree, perhaps obtained using \code{\link[=TipLabels]{TipLabels()}}.} mode \code{integer}: only possible for values < 2^31. If \code{FALSE}, values will have class \code{integer64}.} -\item{\dots}{Depreciated (2025-09); retained for backward compatibility.} +\item{\dots}{Deprecated (2025-09); retained for backward compatibility.} } \value{ \code{TreeShape()} returns an integer specifying the shape of a tree, diff --git a/man/TrivialTree.Rd b/man/TrivialTree.Rd index b6e6622d7..4f1281ed3 100644 --- a/man/TrivialTree.Rd +++ b/man/TrivialTree.Rd @@ -38,7 +38,6 @@ Other tree manipulation: \code{\link{CollapseNode}()}, \code{\link{ConsensusWithout}()}, \code{\link{DropTip}()}, -\code{\link{EnforceOutgroup}()}, \code{\link{ImposeConstraint}()}, \code{\link{KeptPaths}()}, \code{\link{KeptVerts}()}, diff --git a/man/match.Splits.Rd b/man/match.Splits.Rd index 954396227..fd4352e8a 100644 --- a/man/match.Splits.Rd +++ b/man/match.Splits.Rd @@ -2,15 +2,12 @@ % Please edit documentation in R/match.R \name{match,Splits,Splits-method} \alias{match,Splits,Splits-method} -\alias{in.Splits} \alias{match} \alias{\%in\%,Splits,Splits-method} \title{Split matching} \usage{ \S4method{match}{Splits,Splits}(x, table, nomatch = NA_integer_, incomparables = NULL) -in.Splits(x, table) - match(x, table, nomatch = NA_integer_, incomparables = NULL) \S4method{\%in\%}{Splits,Splits}(x, table) @@ -34,10 +31,6 @@ its first argument in its second. a logical vector indicating whether there is a match or not for each split in its left operand. } -\details{ -\code{in.Splits()} is an alias for \code{\%in\%}, included for backwards compatibility. -It is deprecated and will be removed in a future release. -} \examples{ splits1 <- as.Splits(BalancedTree(7)) splits2 <- as.Splits(PectinateTree(7)) diff --git a/tests/testthat/test-tree_descendants.R b/tests/testthat/test-tree_descendants.R index 5222b0796..d79ccef5c 100644 --- a/tests/testthat/test-tree_descendants.R +++ b/tests/testthat/test-tree_descendants.R @@ -23,8 +23,6 @@ test_that("DescendantEdges() works", { expect_equal( DescendantEdges(edge = NULL, pec5$edge[, 1], pec5$edge[, 2]), answer) - expect_warning(AllDescendantEdges(pec5$edge[, 1], pec5$edge[, 2]), - "deprecated") expect_equal( apply(DescendantEdges(node = 0, pec5$edge[, 1], pec5$edge[, 2]), 1, which), list(1:7, 4:7, 6:7)