View source: R/permutation_functions.R
This function will permute a network by randomly switching individuals between events, keeping the oringinal order of the interactions (e.g., individuals in the from or to columns are permuted, but no permutations between from and to columns).
1 2 3 |
data |
Dataframe with relational data in the first two rows, with weights in the thrid row, and a time stamp in the fourth row. Note: time stamps should be in ymd or ymd_hms format. The lubridate package can be very helpful in organizing times. |
measureFun |
This is a function that takes as an input a igraph network and returns a single value. |
directed |
Whether to consider the network as directed or not (TRUE/FALSE). |
nperm |
Number of permutations to perform before extracting network measures. |
probs |
numeric vector of probabilities with values in [0,1]. |
SRI |
Wether to use the simple ratio index (Default=FALSE). |
effortFun |
This is a function that takes as input the data within a window of time and returns the total sampling effort. |
effortData |
This is a dataframe containing the data used to calculate sampling effort. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.