nwduplicate
Duplicate a network
Syntax
nwduplicate
[netname]
[,
name(newnetname)
replace]
name(newnetname) |
name of the new network |
replace |
if a network named newnetname already exists, drop it and use this name anyway (see nwset for the same convention) |
Description
nwduplicate simply duplicates an existing network netname. By default, the duplicated network is called netname_copy. It also duplicates the node labels of the original network.
For example:
- . nwwebuse florentine, nwclear
- . nwduplicate flomarriage
- . nwname flomarriage_copy
- . return list
Network types
The command works the same for every network type (see nwnetworktypes). Temporal: the copy of a temporal network is temporal: events, times, intervals, the temporal type and the names of the time variables are copied.
See also
nwcommands version 3.25.0, 14 November 2026 (check your installed version)