Description Usage Arguments Examples
This function will take a dataframe with events between individuals/objects, and take network measures using a moving window approach.
1 2 3 4 5 | graphTS(data, windowsize = days(30), windowshift = days(1),
measureFun = degree_mean, effortFun = NULL, effortData = NULL,
permutationFun = perm.events, directed = FALSE, lagged = FALSE,
lag = 1, firstNet = FALSE, cores = 1, nperm = 0, probs = 0.95,
SRI = FALSE, windowstart = NULL, windowend = NULL)
|
data |
A dataframe with relational data in the first two columns, and a time stamp in the third column. An optional column with a weight can be added if there is a duration or magnitude for each interaction (column name for this should be set to 'weight'). Note: time stamps should be in ymd or ymd_hms format. The lubridate package can be very helpful in organizing times. |
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 a single value. 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. |
permutationFun |
This is a function that takes as input an events dataframe and a measurment function, and will return a quantile range of network values (see permutation vignette). |
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 forces the comparisons between graphs to always be between the current and first graph. |
cores |
This allows for multiple cores to be used while generating networks and calculating network measures. |
nperm |
This allows for the estimation the network measure assuming random permutations. Currently the 95 percent quantiles are returned. |
probs |
When nperm > 0 this will determine the probability of the permutation values returned from the permuations. |
SRI |
Whether to convert edges to the simple ratio index: Nab / (Nab + Na + Nb). Default is set to FALSE. |
windowstart |
When the moving window should start. Default is the minimum observation time. |
windowend |
When the moving window should stop. Default is the maximum observation time. |
1 | ts.out<-graphTS(data=groomEvents)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.