Learn R Programming

sna (version 2.3-2)

write.dl: Write Output Graphs in DL Format

Description

Writes a graph stack to an output file in DL format.

Usage

write.dl(x, file, vertex.lab = NULL, matrix.lab = NULL)

Arguments

x
a graph or graph stack, of common order.
file
a string containing the filename to which the data should be written.
vertex.lab
an optional vector of vertex labels.
matrix.lab
an optional vector of matrix labels.

Value

None.

Details

DL format is used by a number of software packages (including UCINET and Pajek) to store network data. write.dl saves one or more (possibly valued) graphs in DL edgelist format, along with vertex and graph labels (if desired). These files can, in turn, be used to import data into other software packages.

See Also

write.nos

Examples

Run this code
## Not run: 
# #Generate a random graph stack
# g<-rgraph(5,10)
# 
# #This would save the graphs in DL format
# write.dl(g,file="testfile.dl")
# ## End(Not run)

Run the code above in your browser using DataLab