Closed valentinitnelav closed 5 years ago
A fast fix would be to run a test of bipartite::networklevel
or specieslevel
at the beginning of boot_networklevel
or boot_specieslevel
so that any error message will stop the execution and inform the user.
The cost is that this adds unnecessary computation time to already expensive functions...
Alternatively take the testing section from the bipartite
functions and make a test function that is triggered at the top (?).
Also this problem can't be solved by .errorhandling = 'pass'
in foreach
(which I set anyways with commit 79d757f53225dd784a33370ce047e4bda363637e )
When using a species level index (e.g
betweenness
) as index inboot_networklevel
(orboot_networklevel_n
,boot_networklevel_once
) it still tries to compute something. It should break the code with error message.I think has to do with how I set the
try
inboot_networklevel_once
, becausenetworklevel(Safariland_sort, index = "betweenness", level = "both")
throws an error. That error should be passed toboot_networklevel_n
, which should pass it toboot_networklevel
.Note that, this will stand valid for the species level functions as well.