% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter.R
\name{filter_top}
\alias{filter_top}
\title{Filter edges to top-n nodes}
\usage{
filter_top(edges, n)
}
\arguments{
\item{edges}{A data frame with at least \code{from}, \code{to}, \code{weight} columns.}

\item{n}{Integer. Number of top nodes to keep.}
}
\value{
A filtered data frame with edges among the top \code{n} nodes.
}
\description{
Keeps only edges between the most frequent nodes. Node frequency is
determined by how many edges each node participates in.
}
\examples{
data(biblio_data)
edges <- author_network(biblio_data, "collaboration")

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