In the mcell_mc_hierachy function you are using (around line 108 of mc_hierarchy.r)
while (j != -1 & cells[j] < mincells) {
I got the following error message:
Error in while (j != -1 & cells[j] < mincells) { :
the condition has length > 1
changing the code to
while (j != -1 && cells[j] < mincells) {
resolved the issue.
This happens when j==-1 and cells is a vector of length >1. The "&" evaluates all conditions, while "&&" would break already if the first is not met and also compare only the first incident of cells.
It would be great if you could comment on why you chose the "&" instead of "&&"
In the mcell_mc_hierachy function you are using (around line 108 of mc_hierarchy.r)
I got the following error message:
changing the code to
resolved the issue.
This happens when j==-1 and cells is a vector of length >1. The "&" evaluates all conditions, while "&&" would break already if the first is not met and also compare only the first incident of cells.
It would be great if you could comment on why you chose the "&" instead of "&&"
Thanks for your great tool.