I'm having some issues with the collapse function during my analysis. I want to collapse a node, but I am unable.
First, there is an issue when I run the 'collapse' example:
> x <- rtree(15)
> p <- ggtree(x) + geom_tiplab()
> p1 <- collapse(p, node = 17)
Error in offspring.tbl_tree_item(.data = .data, .node = .node, tiponly = tiponly, :
could not find function "offspring.tbl_tree_item"
Also here:
> set.seed(2017-02-16)
> tree<-rtree(50)
> treexample <- ggtree(tree)
> treexample1 <- collapse(treexample, node = 68)
Error in offspring.tbl_tree_item(.data = .data, .node = .node, tiponly = tiponly, :
could not find function "offspring.tbl_tree_item"
I get an issue on the collapse function whilst working on my tree. I cannot collapse an interior node in a ggtree created from a tibble tree:
>mytree <- read.delim("treedata.csv", sep=",")
>my_tree <- ggtree(mytree)
> p <- my_tree %>% collapse(node=35)
Error in UseMethod("offspring") :
no applicable method for 'offspring' applied to an object of class "c('tbl_df', 'tbl', 'data.frame')"
> collapse(my_tree, 35)
Error in UseMethod("offspring") :
no applicable method for 'offspring' applied to an object of class "c('tbl_df', 'tbl', 'data.frame')"
> class(my_tree)
[1] "ggtree" "gg" "ggplot"
Hi There,
I'm having some issues with the collapse function during my analysis. I want to collapse a node, but I am unable.
First, there is an issue when I run the 'collapse' example:
Also here:
I get an issue on the collapse function whilst working on my tree. I cannot collapse an interior node in a ggtree created from a tibble tree:
This is my session info: