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)


Back to top

nwcommands is free software under the GNU General Public License, version 3, as are the model packages nwsaom, nwergm, nwdynam and nwrem. Citing and licenses · Get help · GitHub. Issues with the core go to the nwcommands repository; issues with a model package go to that package's own repository.

This site uses Just the Docs, a documentation theme for Jekyll.