package_integration: Functions to transform NetSim objects to objects of other...

Description Usage Arguments References Examples

Description

Functions to transform NetSim objects to objects of other network classes. So far, a transformation function to igraph objects is implemented

Usage

1
2
	## S3 method for class 'NetSimNetwork'
as.igraph(x, mode=c("directed", "undirected"), ...)

Arguments

x

A Netsim network object

mode

Character scalar, specifies whether igraph should interpret the graph as directed or undirected. More options are not supported, yet.

...

Additional arguments

References

Csardi G, Nepusz T: The igraph software package for complex network research, InterJournal, Complex Systems 1695. 2006. http://igraph.sf.net

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	nActors <- 4
	network <- create_network(matrix(0, nActors, nActors))

	# set ties
	set_tie(network, i = 0, j = 1, value = 1)
	set_tie(network, i = 0, j = 2, value = 1)
	
	## Not run: library(igraph)
	## Not run: myIGraph <- as.igraph(network, mode = "directed")
	## Not run: plot(myIgraph) # now using the igraph package

NetSim documentation built on May 2, 2019, 5:20 p.m.