Skip to contents

Write a headerless network file with integer node ids and positive link strengths, plus a tab-separated map file with id and label columns. Missing weights become 1. Directed edges are written as supplied, but VOSviewer treats the links as undirected.

Usage

sm_export_vosviewer(network, path, map_path = NULL)

Arguments

network

A tbl_graph object.

path

Output file path.

map_path

Map file path. By default, _map is inserted before the extension of path, or appended if path has no extension.

Value

path invisibly.

Examples

# \donttest{
corpus <- sm_example_corpus()
net <- sm_network_cocitation(corpus)
sm_export_vosviewer(net, tempfile(fileext = ".tsv"))
#> ✔ Network exported for VOSviewer to /tmp/RtmpicujyO/file1c5439ae763b.tsv
# The matching map file is written beside the network file.
# }