tnet_igraph | R Documentation |
The tnet_igraph function creates an igraph object from a tnet network.
tnet_igraph(net,type=NULL, directed=NULL)
net |
A tnet network |
type |
type of tnet network, see as.tnet. |
directed |
if a one-mode networks, this can be set to avoid testing whether the network is directed. |
Returns the igraph object.
version 1.0.0, taken, with permission, from package tnet
Tore Opsahl; https://toreopsahl.com
## Load sample data
sample <- rbind(
c(1,2,4),
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(4,2,1),
c(5,2,2),
c(5,6,1),
c(6,5,1))
## Run the programme
tnet_igraph(sample, type="weighted one-mode tnet")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.