as.networkDynamic | R Documentation |
The as.networkDynamic
generic provides a very basic conversion to
networkDynamic
from other network types. It is generally recommended
to use the networkDynamic
function instead of
as.networkDynamic
, because networkDynamic
provides a
number of additional features for handling temporal information.
## S3 method for class 'networkDynamic'
as.networkDynamic(object,...)
## S3 method for class 'network'
as.networkDynamic(object,...)
## S3 method for class 'networkLite'
as.networkDynamic(object,...)
object |
a |
... |
ignored |
as.networkDynamic.network
converts a network
object into
a networkDynamic
object by adding a networkDynamic
class.
as.networkDynamic.networkLite
converts a networkLite
object into
a networkDynamic
object by first converting it to a network
object and then adding a networkDynamic
class. (networkLite
s are
a backend data structure used in some EpiModel
and statnet
packages, providing improved performance for certain applications, especially
when working with vertex and edge attributes that can be stored as atomic
vectors. Currently, networkLite
s come with the restriction that the
network attributes hyper
, multiple
, and loops
must be
FALSE
. See networkLite-package
for more information.)
Such conversions between network types are used when starting a dynamic
simulation from a cross-sectional network and returning the simulation history
as a dynamic network, as done in the tergm
package for example.
For as.networkDynamic.network
the input object is returned with a
networkDynamic
class added. For as.networkDynamic.networkLite
,
the input object is converted to a network
object and then the
networkDynamic
class is added. For
as.networkDynamic.networkDynamic
the input object is returned
unchanged.
Pavel, Zack W Almquist <almquist@uci.edu>
For the inverse (removing the networkDynamic
class) see
as.network.networkDynamic
and
as.networkLite.network
(which applies to networkDynamic
s).
For extracting cross-sectional information from a networkDynamic
(which
is often more appropriate than simply removing the networkDynamic
class), see network.collapse
and network.extract
.
For more general construction of networkDynamic
s, see
networkDynamic
.
nd <- as.networkDynamic(network.initialize(3))
class(nd)
is.networkDynamic(nd)
nwL <- networkLite::networkLite(3)
nwD <- as.networkDynamic(nwL)
class(nwD)
is.networkDynamic(nwD)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.