% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rename_models.R
\name{rename_models}
\alias{rename_models}
\alias{rename_models.netobject_group}
\alias{rename_models.default}
\title{Rename the models of a \code{netobject_group}}
\usage{
rename_models(x, new_names)

\method{rename_models}{netobject_group}(x, new_names)

\method{rename_models}{default}(x, new_names)
}
\arguments{
\item{x}{A \code{netobject_group} (or any object inheriting from it, such
as \code{net_mlvar}).}

\item{new_names}{A character vector of new names. Must have the same
length as \code{x}, contain no \code{NA} or empty strings, and be unique.}
}
\value{
A \code{netobject_group} of the same class with renamed members.
}
\description{
Replaces the names of the constituent networks in a \code{netobject_group}
(or any object inheriting from it). Useful when \code{build_network()}
produced generic labels (e.g. \code{"Cluster 1"}, \code{"Cluster 2"}) and you
want to substitute meaningful ones (e.g. \code{"High engagement"},
\code{"Low engagement"}).
}
\examples{
\dontrun{
  d   <- tna::group_regulation
  grp <- build_network(d, method = "tna",
                       group = sample(c("a", "b"), nrow(d), TRUE))
  grp <- rename_models(grp, c("High", "Low"))
  names(grp)
}
}
