Closed xiangpin closed 1 year ago
add keep.tip function for treedata
keep.tip
treedata
> library(treeio) > nhxfile <- system.file("extdata/NHX", "ADH.nhx", package="treeio") > nhx <- read.nhx(nhxfile) > toDrop <- c("ADH2", "ADH1") > toKeep <- setdiff(nhx@phylo$tip.label, toDrop) > tr1 <- drop.tip(nhx, toDrop) > tr2 <- keep.tip(nhx, toKeep) > identical(tr1, tr2) [1] TRUE
Description
add
keep.tip
function fortreedata
Related Issue
Example