iterate | R Documentation |
Iterate through species-removal robustness assessments in food webs
iterate( fw_to_attack, probs_of_fw, alpha1, iter, i_index, plot = FALSE, export_plot = FALSE, plot_name = NULL )
fw_to_attack |
Food web matrix to be attacked, a matrix. |
probs_of_fw |
Vector with the probability of attack to each node. |
alpha1 |
Percentage of secondary extinctions after a primary extinction. |
iter |
Number of iterations to simulate. |
i_index |
Parameter, between 0 and 1 defining the probability of attacking hubs. |
plot |
Plot the results of the simulation (TRUE/FALSE). |
export_plot |
Should plots be exported to the working directory (TRUEFALSE) |
plot_name |
Plot file naming. |
A list of vectors with each metric.
data(mg1) graph_list1 <- convert.to.graph.list(mg1) #Create a vector with the values for the Intentionality Index (I) i_index <- seq(from = 0, to = 1, by =0.01) i_index <- head(i_index,-1) fw1 <- graph_list1[[1]] prob_exp <- exponent.removal(fw1, i_index) it1 <- iterate(fw_to_attack=fw1, prob_exp, alpha1=50, iter=10, i_index, plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.