| conetwork | R Documentation |
With one field, entities are linked when they co-occur in the same
document. With by, entities are linked when they share values of the
by field across documents.
conetwork(
data,
field,
by = NULL,
sep = ";",
counting = "full",
similarity = "none",
threshold = 0,
min_occur = 1L,
top_n = NULL,
self_loops = FALSE,
deduplicate = TRUE,
format = "edgelist",
strip_quotes = TRUE,
id = NULL
)
data |
A data frame with column |
field |
Character. The entity field — determines what the nodes are. |
by |
Character or |
sep |
Character or |
counting |
Character. Counting method. Default |
similarity |
Character. Normalization method. Default |
threshold |
Numeric. Minimum edge weight. Default 0. |
min_occur |
Integer. Minimum entity frequency. Default 1. |
top_n |
Integer or NULL. Return only the top n edges by weight. Default NULL (all edges). |
self_loops |
Logical. If |
deduplicate |
Logical. If |
format |
Character. Output format:
|
strip_quotes |
Logical. If |
id |
Optional. Name of the column to use as the work identifier
(the matrix-row dimension). If |
Fields can be list-columns (already split) or character columns with
delimiters (auto-split via sep).
Depends on format: a bibnets_network data frame (default),
a Gephi-ready data frame, an igraph graph, a cograph_network, or a
sparse matrix.
data(biblio_data)
# Co-occurrence: keywords appearing in the same document
conetwork(biblio_data, "keywords")
# Authors linked by shared keywords
conetwork(biblio_data, "authors", by = "keywords")
# Keywords linked by shared authors
conetwork(biblio_data, "keywords", by = "authors")
# Journals linked by shared references (= journal coupling)
conetwork(biblio_data, "journal", by = "references", similarity = "cosine")
# Auto-splits semicolon-delimited string columns
d <- data.frame(id = 1:3, tags = c("ml; dl; nlp", "ml; cv", "dl; cv"))
conetwork(d, "tags")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.