as_dynet: Convert an object to a Dynet temporal network

View source: R/coercion.R

as_dynetR Documentation

Convert an object to a Dynet temporal network

Description

Imports a temporal network held in another R representation, so that every Dynet verb applies to it. A method is supplied for networkDynamic objects; the method for dynet is the identity.

Usage

as_dynet(x, ...)

## S3 method for class 'dynet'
as_dynet(x, ...)

Arguments

x

An object representing a temporal network.

...

Passed to a class-specific method.

Value

A dynet() temporal network: an object of class c("dynet", "netobject", "cograph_network") carrying the tie ledger, the node table and the construction metadata. The dynet method is the identity, returning x unchanged, so as_dynet() is safe to call on an object that is already a temporal network.

See Also

as_dynet.networkDynamic(), which imports a networkDynamic object.

Examples

dn <- dynet(data.frame(from = "A", to = "B", start = 0, end = 1))
as_dynet(dn)
dn <- dynet(school_contacts)
same <- as_dynet(dn)
same

Dynet documentation built on Oct. 7, 2026, 5:08 p.m.