nodeTS: nodeTS function

Description Usage Arguments Examples

Description

This function will take a dataframe with events between individuals/objects, and take network measures using a moving window approach.

Usage

1
2
3
4
nodeTS(data, windowsize = days(30), windowshift = days(1),
  measureFun = degree, effortFun = NULL, effortData = NULL,
  directed = FALSE, lagged = FALSE, lag = 1, firstNet = FALSE,
  cores = 1)

Arguments

data

A dataframe with relational data in the first two columns, and a time stamp in the third columns Note: time stamps should be in ymd_hms format. The lubridate package can be very helpful in organizing times. Note: names in the first two columns are case sensitive.

windowsize

The size of the moving window in which to take network measures. These should be provided as e.g., days(30), hours(5), ... etc.

windowshift

The amount to shift the moving window for each measure. Again times should be provided as e.g., days(1), hours(1), ... etc.

measureFun

This is a function that takes as an input a igraph network and returns values for each node in the network. There are functions within netTS (see details), and custom made functions can be used.

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.

directed

Whether the events are directed or no: true or false.

lagged

Whether the network measure function used requires the comparison between two networks. e.g., comparing the current network to one lagged by 10 days. If TRUE the measureFun should take two graphs as input and return a single value. The order of inputs in the function is the lagged network followed by the current network.

lag

If lagged is set to TRUE, this is the lag at which to compare networks.

firstNet

If lagged is set to TRUE, this compares the subsequent networks to the first network.

cores

This allows for multiple cores to be used while generating networks and calculating network measures.

Examples

1

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