Skip to content

Commit

Permalink
ace() now uses node labels if available
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelparadis committed Jan 28, 2024
1 parent d9617e8 commit 86d4264
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ape
Version: 5.7-1.8
Date: 2024-01-15
Date: 2024-01-28
Title: Analyses of Phylogenetics and Evolution
Authors@R: c(person("Emmanuel", "Paradis", role = c("aut", "cre", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-3092-2199")),
person("Simon", "Blomberg", role = c("aut", "cph"), comment = c(ORCID = "0000-0003-1062-0839")),
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ OTHER CHANGES
size. The code is three times faster with small trees; twice
faster with ~1000 tips (the gain is less with bigger trees).

o ace() now uses node labels, if available, in the output.



CHANGES IN APE VERSION 5.7-1
Expand Down
10 changes: 8 additions & 2 deletions R/ace.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## ace.R (2022-03-02)
## ace.R (2024-01-28)

## Ancestral Character Estimation

## Copyright 2005-2022 Emmanuel Paradis and 2005 Ben Bolker
## Copyright 2005-2024 Emmanuel Paradis and 2005 Ben Bolker

## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
Expand Down Expand Up @@ -298,6 +298,12 @@ ace <-
obj$lik.anc <- lik.anc
}
}
## edited from Thomas G (PR #106):
if (!is.null(phy$node.label)) {
names(obj$ace) <- phy$node.label
if (!is.null(obj$CI95))
rownames(obj$CI95) <- phy$node.label
}
obj$call <- match.call()
class(obj) <- "ace"
obj
Expand Down

0 comments on commit 86d4264

Please sign in to comment.