% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/network-utils.R
\name{select_edges_involving}
\alias{select_edges_involving}
\title{Select Edges Involving Nodes}
\usage{
select_edges_involving(
  x,
  nodes,
  ...,
  .keep_isolates = FALSE,
  keep_format = FALSE,
  directed = NULL
)
}
\arguments{
\item{x}{Network input.}

\item{nodes}{Character or integer. Node names or indices.}

\item{...}{Additional filter expressions.}

\item{.keep_isolates}{Keep nodes with no edges? Default FALSE.}

\item{keep_format}{Keep input format? Default FALSE.}

\item{directed}{Auto-detect if NULL.}
}
\value{
A cograph_network with edges involving the specified nodes.
}
\description{
Select edges where at least one endpoint is in the specified node set.
}
\examples{
adj <- matrix(c(0, .5, .8, 0,
                .5, 0, .3, .6,
                .8, .3, 0, .4,
                 0, .6, .4, 0), 4, 4, byrow = TRUE)
rownames(adj) <- colnames(adj) <- c("A", "B", "C", "D")

# Edges involving A
select_edges_involving(adj, nodes = "A")

# Edges involving A or B
select_edges_involving(adj, nodes = c("A", "B"))
}
\seealso{
\code{\link{select_edges}}, \code{\link{select_edges_between}}
}
