Need to check why this error happens. Bootstrapping should not fail even if unique interactions, or? If the case, then set an informative error message.
library(dplyr)
library(bipartite)
data(Safariland)
unique_interactions_data <- web_matrix_to_df(Safariland) %>% unique()
boot_networklevel(lst = list(s1 = doubtful_data),
col_lower = "lower", # column name for plants
col_higher = "higher", # column name for insects
index = "nestedness",
level = "both",
start = 10,
step = 10,
n_boot = 6,
n_cpu = 2)
## Error in FUN(X[[i]], ...) :
## attempt to select less than one element in get1index
Need to check why this error happens. Bootstrapping should not fail even if unique interactions, or? If the case, then set an informative error message.