我有一棵带n个技巧的系统树,我想删除所有技巧,只保留内部分支和内部节点(在删除原始技巧之后,这些内部节点将成为新树中的技巧)。我在R中使用了“ drop.tip”函数,但是它不起作用,请参见以下示例:
tree = rtree(10)
drop_tree = drop.tip(tree,
c("t7","t4","t9","t3","t1","t2","t5","t8","t6","t10"),
trim.internal = FALSE,
collapse.singles = FALSE )
但是它给了我一棵空树(“删除树的所有技巧:返回NULL”) 你有办法吗?