The file must contain one line per node listing first a node and then
that node's neighbours, separated by whitespace (by default; other
separated can be specified). Node are identified by numbers starting
with idxbase
(by default 1); the maximal node index that appears in
the file defines the size of the network. For undirected networks (i.e.
if undirected=TRUE
), for every link (u,v) listed in the file the reverse
link (v,u) is added as well.
Lines starting with the comment chracter '#' and skipped. If the first non-comment line does not start with a numerical node index, it is assumed to be a header line and skipped as well.
Usage
empirical_network(
path,
name = NULL,
group = "undirected",
undirected = TRUE,
simplify = FALSE,
idxbase = 1,
sep = " ",
gzip = grepl("\\.gz$", path),
download.timeout = 300
)
Arguments
- path
name of the file
- name
name of a packaged empirical network, see
packaged_empirical_network
- group
packaged empirical network group containing the network
- undirected
if
TRUE
the network is assumed to be undirected- simplify
whether to remove self-edges and multi-edges
- idxbase
index of the first node (typically 1 or 0, default 1)
- sep
separator, by default whitespace
- gzip
whether the file is compressed
- download.timeout
for packaged networks the download timeout