|
The symmetrise function creates an undirected network from an edgelist. It has two options: - edgelist: the input dataset
- method: the method used to decide the weight of the undirected edge
- "MAX" sets the weight to the maximum of the weight(s) of the arc(s)
- "MIN" sets the weight to the minimumof the weight(s) of the arc(s)
- "AMEAN" sets the weight to the average (arithmetic mean) of the weight(s) of the arc(s)
- "SUM" sets the weight to the sum of the weight(s) of the arc(s)
- "PROD" sets the weight to the product of the weight(s) of the arc(s)
- "DIFF" sets the weight to the absolute difference between the weight(s) of the arc(s)
Example: Sample data ## Load tnet library(tnet) ## Sample data
sample <- rbind( c(1,2,2), c(1,3,2), c(2,1,4), c(2,3,4), c(2,4,1), c(2,5,2), c(3,1,2), c(3,2,4), c(5,2,2), c(5,6,1)) ## Run programme
symmetrise(sample, method="MAX") |