Skip to content

Commit ce1e734

Browse files
committed
Ntip for treedatalist
1 parent 297feef commit ce1e734

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ License: Artistic-2.0
3434
URL: https://www.amazon.com/Integration-Manipulation-Visualization-Phylogenetic-Computational-ebook/dp/B0B5NLZR1Z/
3535
BugReports: https://github.com/YuLab-SMU/tidytree/issues
3636
Encoding: UTF-8
37-
RoxygenNote: 7.3.0
37+
RoxygenNote: 7.3.1
3838
Roxygen: list(markdown = TRUE)

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ S3method(Nnode,tbl_tree)
1515
S3method(Nnode,treedata)
1616
S3method(Ntip,tbl_tree)
1717
S3method(Ntip,treedata)
18+
S3method(Ntip,treedataList)
1819
S3method(ancestor,phylo)
1920
S3method(ancestor,tbl_tree)
2021
S3method(ancestor,treedata)

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# tidytree 0.4.6.001
2+
3+
+ `Ntip()` method for 'treedataList' object (2024-04-08, Mon)
4+
15
# tidytree 0.4.6
26

37
+ import `methods::setClassUnion()` to fix R check (2023-12-12, Tue)

R/ape.R

+7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ Ntip.treedata <- function(phy) {
4242
Ntip(as.phylo(phy))
4343
}
4444

45+
##' @method Ntip treedataList
46+
##' @importFrom ape Ntip
47+
##' @export
48+
Ntip.treedataList <- function(phy) {
49+
Ntip(phy[[1]])
50+
}
51+
4552
##' number of nodes
4653
##'
4754
##'

0 commit comments

Comments
 (0)