Unable to get the ggtree() function working, even though it worked originally.
Whenever I run the code (see below) I get the following error:
Error in DataMask$new(.data, caller_env) :
argument "caller_env" is missing, with no default
Advice from other forums suggest it's an issue with the version of "dplyr" -however I've seen ggtree run without error on another machine that runs Version 1.0.6 of dplyr so I'm unconvinced this is the problem.
Have tried the following (several times) all without joy:
# BiocManager::install("ggtree")
library(ggtree)
#> Registered S3 method overwritten by 'treeio':
#> method from
#> root.phylo ape
#> ggtree v2.2.4 For help: https://yulab-smu.github.io/treedata-book/
#>
#> If you use ggtree in published research, please cite the most appropriate paper(s):
#>
#> e[36m-e[39m Guangchuang Yu. Using ggtree to visualize data on tree-like structures. Current Protocols in Bioinformatics, 2020, 69:e96. doi:10.1002/cpbi.96
#> e[36m-e[39m Guangchuang Yu, Tommy Tsan-Yuk Lam, Huachen Zhu, Yi Guan. Two methods for mapping and visualizing associated data on phylogeny using ggtree. Molecular Biology and Evolution 2018, 35(12):3041-3043. doi:10.1093/molbev/msy194
#> e[36m-e[39m Guangchuang Yu, David Smith, Huachen Zhu, Yi Guan, Tommy Tsan-Yuk Lam. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. Methods in Ecology and Evolution 2017, 8(1):28-36. doi:10.1111/2041-210X.12628
set.seed(2017-02-16)
tree <- rtree(50)
ggtree(tree)
Thanks Technocrat, that's exactly what I obtained the first time I ran it. Since then, though, I only get the aforementioned error. Advice from elsewhere suggests that the Dplyr version is the issue - most current is 1.0.6 which is what I am running. I see you are running the same version, so clearly this is not the issue.
Here's the error:
Error in DataMask$new(.data, caller_env) :
argument "caller_env" is missing, with no default
I normally enjoy an interesting problem, but this one is driving me to drink
Thanks again.
Mysterious. I hope it’s not a Windows artifact (because I can’t help there). This may have something to do with deep rlang voodoo. I’ll check tomorrow to see if I can find a scent.
Please also update tidytree by remotes::install_github("YuLab-SMU/tidytree") . This is beacuse the mutate.tbl_tree in tidytree was not updated in old version.
I also rolled back dplyr from 1.0.6 to 1.0.5 as per his instructions. Not sure whether the tidytree change would have been suffcient,, and I'm not brave enough to try.