You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed it is easy to misuse sim.bdtree, as this code may convince you of:
library(geiger)
# Should give error: 'if stopping criterium is set to 'time', please do not set the number of taxa 'n'
sim.bdtree(b = 0.4, d = 0.1, stop = "time", n = 10, t = 10)
# Should give error: 'if stopping criterium is set to 'taxa', please do not set the time of the simulation 't'
sim.bdtree(b = 0.4, d = 0.1, stop = "taxa", n = 10, t = 10)
# Should give error: 'if stopping criterium is set to 'time', please provide a value for 'n''
sim.bdtree(b = 0.4, d = 0.1, stop = "time", n = 10)
# Should give error: 'if stopping criterium is set to 'taxa', please provide a value for 'n''
sim.bdtree(b = 0.4, d = 0.1, stop = "taxa", t = 10)
It would have saved me some debugging if geiger did check its arguments.
Could you fix it? If you assign me, I will provide a pull request. Note that I will change the default parameters for n and t to NA or NULL, but I do not expect this to break code (yet I may be wrong).
The text was updated successfully, but these errors were encountered:
Hi Matthew,
I noticed it is easy to misuse sim.bdtree, as this code may convince you of:
It would have saved me some debugging if geiger did check its arguments.
Could you fix it? If you assign me, I will provide a pull request. Note that I will change the default parameters for
n
andt
toNA
orNULL
, but I do not expect this to break code (yet I may be wrong).The text was updated successfully, but these errors were encountered: