metric[[i]] = list(Past_low = com_matPast_Fam_L,
Past_med = com_matPast_Fam_M,
Past_high = com_matPast_Fam_H,
Present_low = com_matPresent_Fam_L,
Present_med = com_matPresent_Fam_M,
Present_high = com_matPresent_Fam_H) %>%
lapply(web_matrix_to_df) %>%
boot_specieslevel(col_lower = "lower", # column name for plants # https://valentinitnelav.github.io/bootstrapnet/examples.html
col_higher = "higher", # column name for insects
level = "higher",
index = i, # each index takes ~ 1min of CPU time
start = 20,
step = 10,
n_boot = 30, # number of bootstraps
n_cpu = 4) # number of CPU-s to use
metric[[i]] = list(Past_low = com_matPast_Fam_L, Past_med = com_matPast_Fam_M, Past_high = com_matPast_Fam_H, Present_low = com_matPresent_Fam_L, Present_med = com_matPresent_Fam_M, Present_high = com_matPresent_Fam_H) %>% lapply(web_matrix_to_df) %>% boot_specieslevel(col_lower = "lower", # column name for plants # https://valentinitnelav.github.io/bootstrapnet/examples.html col_higher = "higher", # column name for insects level = "higher", index = i, # each index takes ~ 1min of CPU time start = 20, step = 10, n_boot = 30, # number of bootstraps n_cpu = 4) # number of CPU-s to use
cols <- c("Past_low" = "grey75", "Past_med" = "grey55", "Past_high" = "gray40", "Present_low" = "skyblue3", "Present_med" = "dodgerblue2", "Present_high"= "darkblue")
Apidae <- metric[[i]] %>% get_stats_multi() %>% gg_specieslevel_compare_webs(sp_higher = "Apidae")
Apidae$higher_level + scale_color_manual(values = cols)