export.pajek.net {ndtv}R Documentation

Export a network file as a Pajek .net formatted text file.

Description

A basic tool for exporting a network as a Pajek http://pajek.imfm.si/doku.php?id=pajek .net format text file. Does not yet encode attributes, layout information or timing info.

Usage

export.pajek.net(net, filename)

Arguments

net

a network object

filename

the file where the network object should be saved

Details

.net is basically an edgelist format with sections for vertices, arcs and edges. Vertex attributes for 'label', coordinates named 'x','y','z', 'color' as 'ic' (inner color), 'shape' as a shape value will be written in the appropriate Pajek format. An edge attribute of 'weight' will be written as the edge value, 'width' as 'w' and 'color' as 'c'. See read.paj for reading pajek files (time info supported)

Value

A file is written out containing the vertex and edge data.

Note

This is a very minimal implementation, mostly used for testing layout algorithms. Timing information is not yet supported.

Author(s)

Skye Bender-deMoll

References

Pajek software: http://pajek.imfm.si/doku.php?id=pajek

Pajek file format documentation: http://vlado.fmf.uni-lj.si/pub/networks/pajek/svganim/1.10.7.1/PajekToSvgAnim.pdf

Examples

data('toy_epi_sim')
toy_epi_sim%v%'color'<-'blue'
export.pajek.net(toy_epi_sim,filename='toy_epi_sim.net')

# clean up file afterwards (just for testing)
file.remove('toy_epi_sim.net')

[Package ndtv version 0.13.3 Index]