Tuesday, May 21, 2019

Fix to plotTree.wBars for fan-style trees

I've received a couple of reports that the popular phytools function plotTree.wBars is broken for type="fan".

Generally, the complaint looks as follows:

“ I have tried to use your plotTree.wBars function following exactly the example you have in your blog, but then I always get this error (I tried with my own data and I can only plot the bars with phylogram type but never with a fan type tree): "Error in plotTree(tree, type = "fan", ftype = if (tip.labels) "i" else "off", : object 'add' not found"

I can't explain how this happen, but I believe it is now fixed.

Let's see the error then load the function from source & try again:

## Error in plotTree(tree, type = "fan", ftype = if (tip.labels) "i" else "off", : object 'add' not found

plot of chunk unnamed-chunk-1

This can also be fixed by updating phytools from GitHub using devtools.

No comments:

Post a Comment

Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.