Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree plot error2 #10

Closed
xtmgah opened this issue Aug 1, 2017 · 5 comments
Closed

tree plot error2 #10

xtmgah opened this issue Aug 1, 2017 · 5 comments

Comments

@xtmgah
Copy link

xtmgah commented Aug 1, 2017

Hello:

I am using the plot.tree.clone.as.branch function to generate the tree. But i found there is no tree generated if the branches like this:

tree_data %>% select(lab,parent,branches)
lab parent branches
1 1 13 021
2 2 14 0221
3 3 14 0222
10 10 -1 Y
5 5 16 01221
6 6 16 01222
7 7 15 0121
8 8 11 0111
9 9 11 0112
11 11 12 011
12 12 17 01
13 13 17 02
14 14 13 022
15 15 12 012
16 16 15 0122
17 17 10 0

plot.tree.clone.as.branch(tree_data,angle = 30,node.size =0,branch.text.size = 0.5,text.angle = 0,node.text.size = 1,branch.width=0.5)
Error in x0[i] <- x1[which(x$branches == parent)] :
replacement has length zero

Could you let me know how to fix this? ??

Here is the data frame of tree_data.
tree_data.RData.zip

@hdng
Copy link
Owner

hdng commented Aug 1, 2017

Looks like your tree has many branches. I've recently updated the tree package to handle more branches. Could you update it and see if the problem still persists?

devtools::install_github('hdng/trees')

@xtmgah
Copy link
Author

xtmgah commented Aug 1, 2017 via email

@xtmgah
Copy link
Author

xtmgah commented Aug 1, 2017 via email

@xtmgah
Copy link
Author

xtmgah commented Aug 2, 2017

Could you help to fix this? Thanks.

@xtmgah
Copy link
Author

xtmgah commented Aug 2, 2017

I just try to put the "Y" in the first row and it totally working... So i think the program default need the "Y" trunk in the first row....

@xtmgah xtmgah closed this as completed Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants