filter_top: Filter edges to top-n nodes

View source: R/filter.R

filter_topR Documentation

Filter edges to top-n nodes

Description

Keeps only edges between the most frequent nodes. Node frequency is determined by how many edges each node participates in.

Usage

filter_top(edges, n)

Arguments

edges

A data frame with at least from, to, weight columns.

n

Integer. Number of top nodes to keep.

Value

A filtered data frame with edges among the top n nodes.

Examples

data(biblio_data)
edges <- author_network(biblio_data, "collaboration")

# Keep only edges among the top 3 most connected authors
filter_top(edges, 3)

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