Skip to content
Guangchuang Yu edited this page Feb 17, 2016 · 9 revisions

Could not find function

If you got this error, please make sure you are using the latest R and ggtree.

Packages in Bioconductor, like ggtree, have different release policy compare to CRAN. There are two branches, release and devel, in parallel. Release branch is more stable and only document improvement and bug fixes will commit to it. New functions will only commit to devel branch.

Sometimes I may write blog post to introduce new functions which is not available in release branch, you need to install the devel version of ggtree in order to use these new functions.

You can download the devel version of ggtree from http://bioconductor.org/packages/devel/bioc/html/ggtree.html and install it, or install the github version of ggtree.

This also applied to other of my packages, including GOSemSim, DOSE, clusterProfiler, ReactomePA and ChIPseeker. If you got the could not find function error, upgrade your installation to latest release. If the error still exists after upgrade to latest release, you need to install the devel version.

Tip label truncated

ggplot2 can't auto adjust xlim based on added text.

library(ggtree)
## example tree from https://support.bioconductor.org/p/72398/
tree<-read.tree(text="(Organism1.006G249400.1:0.03977,(Organism2.022118m:0.01337,(Organism3.J34265.1:0.00284,Organism4.G02633.1:0.00468)0.51:0.0104):0.02469);")
ggtree(tree) + geom_tiplab()

This is because the units are in two different spaces (data and pixel). Users can use xlim to allocate more space for tip label.

ggtree(tree) + geom_tiplab() + xlim(0, 0.06)