Skip to contents

Write a tidygraph network to GEXF XML format for use with Gephi. Labels are escaped as XML, and directed networks retain their direction.

Usage

sm_export_gephi(network, path)

Arguments

network

A tbl_graph object.

path

Output file path (should end in .gexf).

Value

path invisibly.

Examples

# \donttest{
corpus <- sm_example_corpus()
net <- sm_network_cocitation(corpus)
sm_export_gephi(net, tempfile(fileext = ".gexf"))
#> ✔ Network exported to /tmp/RtmpicujyO/file1c5441100549.gexf
# }