View source: R/data-access-io-prepare.R
| read_network | R Documentation |
Read a third-party graph file with igraph
read_network(
path,
format = c("graphml", "gml", "ncol", "lgl", "pajek", "edgelist"),
output_network_format = c("igraph", "sparse", "legacy"),
case_sensitive = FALSE,
...,
network_format = NULL,
species,
input_id_format = master_id_format(species),
id_mappings = NULL,
ambiguous = c("error", "drop", "first", "expand"),
unmapped = c("keep", "drop", "error")
)
path |
Input graph file. |
format |
An igraph reader format. |
output_network_format |
Return an igraph, sparse, or legacy NEArender network. |
case_sensitive |
Preserve identifier case. |
... |
Additional arguments passed to |
network_format |
Deprecated alias for |
species |
Required species identifier accepted by
|
input_id_format |
Submitted identifier format. Defaults to
|
id_mappings |
Optional object from |
ambiguous, unmapped |
Mapping policies passed to |
A normalized igraph, sparse, or legacy NEArender network.
import_network(), export_network(), convert_network()
graph <- import_network(data.frame(from = "A", to = "B", score = 2),
score_column = "score", species = NULL, input_id_format = "custom",
verbose = FALSE)
path <- tempfile(fileext = ".graphml")
export_network(graph, path)
restored <- read_network(path, species = NULL, input_id_format = "custom")
unlink(path)
igraph::edge_attr(restored, "weight")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.