% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/net.fn.utils.R
\name{idgroup}
\alias{idgroup}
\title{Group Numbers for Two-Group Network}
\usage{
idgroup(nw, ids = NULL)
}
\arguments{
\item{nw}{Object of class \code{network} or \code{networkDynamic}.}

\item{ids}{Vector of ID numbers for which the group number
should be returned. If \code{NULL} (default), return all IDs.}
}
\value{
A vector containing the group number for each of the specified nodes.
}
\description{
Outputs group numbers given ID numbers for a two-group network.
}
\examples{
nw <- network_initialize(n = 10)
nw <- set_vertex_attribute(nw, "group", rep(1:2, each = 5))
idgroup(nw)
idgroup(nw, ids = c(3, 6))

}
\keyword{internal}
\keyword{netUtils}
