as.network.networkDynamic: Remove 'networkDynamic' class name from networkDynamic...

View source: R/utilities.R

as.network.networkDynamicR Documentation

Remove ‘networkDynamic’ class name from networkDynamic object.

Description

Changes the class of a networkDynamic object to a plain network object while leaving all attributes (including dynamic attributes) intact.

Usage

 ## S3 method for class 'networkDynamic'
as.network(x, ...)

Arguments

x

A networkDynamic object that will have its class name stripped.

...

Possible additional arguments

Details

The primary use-case for this method is to force some other S3 method (like simulate in the tergm package, plot, or print) to use 'network' instead of 'networkDynamic' in method dispatching. Dynamic features data structures be left intact but not recognized by corresponding methods, so effectively broken.

Value

Returns the original network with the networkDynamic class name removed but all other attributes unchanged

Author(s)

Skye Bender-deMoll

See Also

See Also as network.extract for extracting parts of a networkDynamic, and network.collapse for extracting part of a networkDynamic as a static network. as.networkDynamic for the inverse operation (adding the networkDynamic class to a static network).

Examples

test<-network.initialize(2)
add.edges.active(test,tail=1,head=2,onset=1,terminus=2)
is.networkDynamic(test)
test<-as.network(test)
is.networkDynamic(test)


networkDynamic documentation built on Feb. 16, 2023, 10:08 p.m.