perm.events.directed: Perform permutation on the events dataframe, maintaining...

Description Usage Arguments

View source: R/permutation_functions.R

Description

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).

Usage

1
2
3
perm.events.directed(data, measureFun, directed = FALSE, nperm = 1000,
  probs = 0.95, SRI = FALSE, effortFun = NULL, effortData = NULL,
  windowstart, windowend)

Arguments

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.


tbonne/netTS documentation built on July 26, 2021, 2:27 a.m.