You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, applying mutate on tbl_tree remains no longer tbl_tree object . And therefore, cannot convert back to tree using as.phylo(). See the example below
tree <- rtree(4)
tree
Phylogenetic tree with 4 tips and 3 internal nodes.
Tip labels:
[1] "t1" "t4" "t3" "t2"
Rooted; includes branch lengths.
as_data_frame(tree) %>% class()
[1] "tbl_tree" "tbl_df" "tbl" "data.frame"
as_data_frame(tree) %>% dplyr::mutate(row_number()) %>% class()
[1] "tbl_df" "tbl" "data.frame"
tree_data <- as_data_frame(tree) %>% dplyr::mutate(row_number())
as.phylo(tree_data)
Error in UseMethod("as.phylo") :
no applicable method for 'as.phylo' applied to an object of class "c('tbl_df', 'tbl', 'data.frame')"
The text was updated successfully, but these errors were encountered:
cparsania
changed the title
using the dplyr::mutate on tbl_tree convert it to tbl_df
using the dplyr::mutate on tbl_tree convert it to tbl_dfJul 31, 2018
cparsania
changed the title
using the dplyr::mutate on tbl_tree convert it to tbl_df
using the dplyr::mutate on tbl_tree convert it to tbl_df
Jul 31, 2018
Hi, applying mutate on
tbl_tree
remains no longertbl_tree
object . And therefore, cannot convert back to tree usingas.phylo()
. See the example belowThe text was updated successfully, but these errors were encountered: