reference_network: Build a reference network

View source: R/reference-network.R

reference_networkR Documentation

Build a reference network

Description

Constructs a co-citation or equivalence network among cited references. Two references are linked when they are cited together by the same paper.

Usage

reference_network(
  data,
  type = "co_citation",
  counting = "full",
  similarity = "none",
  threshold = 0,
  min_occur = 1L,
  top_n = NULL,
  self_loops = FALSE,
  deduplicate = TRUE,
  format = "edgelist",
  references = "references",
  sep = ";",
  strip_quotes = TRUE,
  id = NULL
)

Arguments

data

A data frame with id and a references column (list-column or delimited string).

type

Character. "co_citation" (default) or "equivalence".

counting

Character. Counting method. Default "full".

similarity

Character. Similarity measure. Default "none".

threshold

Numeric. Minimum edge weight. Default 0.

min_occur

Integer. Minimum times a reference must be cited. Default 1.

top_n

Integer or NULL. Return only the top n edges by weight. Default NULL (all edges).

self_loops

Logical. If TRUE, include self-loops (an entity linked to itself). Default FALSE.

deduplicate

Logical. If TRUE (default), each ⁠(paper, entity)⁠ pair is counted at most once — duplicate entries in the source data (e.g., the same author listed twice on a paper) are treated as one occurrence. Set to FALSE to count every raw occurrence.

format

Character. Output format:

"edgelist"

Default. A bibnets_network data frame with columns from, to, weight, count.

"gephi"

Gephi-ready data frame: Source, Target, Weight, Count, Type.

"igraph"

An igraph graph object (requires igraph).

"cograph"

A cograph_network object (requires cograph).

"matrix"

A sparse adjacency matrix.

references

Character. Name of the column containing cited references. Default "references".

sep

Character. Separator used to split the entity column when it is a plain character column rather than a list-column, e.g. sep = "," or sep = " and ". Default ";". Ignored for list-columns. sep applies only to the author column; the references column uses references_sep.

strip_quotes

Logical. If TRUE (default), surrounding quote characters are removed from each reference.

id

Optional. Name of the column to use as the work identifier (the matrix-row dimension). If NULL (default), an existing id column is used when present, otherwise row numbers are used.

Value

Depends on format: a bibnets_network data frame (default), a Gephi-ready data frame, an igraph graph, a cograph_network, or a sparse matrix.

Examples

data(biblio_data)
reference_network(biblio_data)
reference_network(biblio_data, similarity = "association")

bibnets documentation built on June 19, 2026, 1:06 a.m.