ggtree
ggtree copied to clipboard
Can not find function getsubtree
trafficstars
Hi,
I am using the most updated ggtree.
When I tried to zoom in to specific clade using getsubtree, it is said the function not found.
I am wondering whether there is any requirement I missed using installation.
Thanks!
Prerequisites
- [ ] Have you read Feedback and follow the guide?
- [ ] make sure your are using the latest release version
- [ ] read the documents
- [ ] google your question/issue
Describe you issue
- [ ] Make a reproducible example (e.g. 1)
- [ ] your code should contain comments to describe the problem (e.g. what expected and actually happened?)
Ask in right place
- [ ] for bugs or feature requests, post here (github issue)
- [ ] for questions, please post to google group
In addition,
I also tried to do this:
It seems the function is there but I cannot use it.
The problem is that getSubtree() is not an exported function so you normally can't access it:
> getAnywhere(getSubtree)
A single object matching ‘getSubtree’ was found
It was found in the following places
namespace:ggtree
with value
function (tree, node)
{
tidytree::offspring(tree, node, self_include = TRUE)
}
<bytecode: 0x000001a5d83b20c0>
<environment: namespace:ggtree>
One way to use it anyways would be:
> ggtree:::getSubtree()
Alternatively, you could also use the offspring() function from the tidytree package with self_include = TRUE.
You might want to have a look at #186.