% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graph_components.R
\name{graph_components}
\alias{graph_components}
\title{Connected components of metric graph}
\value{
Object of \code{\link[R6]{R6Class}} for creating metric graph components.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} \code{graph_components} is
deprecated. \code{metric_graph} now handles disconnected graphs directly:
construct it with \code{check_connected = FALSE}, then use
\code{mg$get_components()} to obtain a list of per-component
\code{metric_graph} objects, \code{mg$which_component(XY)} to route spatial
points, and \code{mg$plot(components = TRUE)} to colour the components.
Distance methods (\code{compute_geodist}, \code{compute_resdist},
\code{compute_laplacian}) and SPDE machinery (\code{spde_precision},
\code{sample_spde}, \code{graph_lme}, ...) all work on disconnected
\code{metric_graph} objects natively — precision matrices come out
block-diagonal by construction.
}
\details{
A list of \code{metric_graph} objects (representing the different
connected components in the full graph) created from vertex and edge matrices,
or from an sp::SpatialLines object where each line is representing and edge.
For more details, see the vignette:
\code{vignette("metric_graph", package = "MetricGraph")}
}
\examples{
library(sp)
edge1 <- rbind(c(0, 0), c(1, 0))
edge2 <- rbind(c(1, 0), c(2, 0))
edge3 <- rbind(c(1, 1), c(2, 1))
edges <- list(edge1, edge2, edge3)

suppressWarnings(graphs <- graph_components$new(edges))
graphs$plot()
}
\keyword{internal}
\section{Public fields}{
  \if{html}{\out{<div class="r6-fields">}}
  \describe{
    \item{\code{graphs}}{List of the graphs representing the connected components.}

    \item{\code{n}}{The number of graphs.}

    \item{\code{sizes}}{Number of vertices for each of the graphs.}

    \item{\code{lengths}}{Total edge lengths for each of the graphs.}

    \item{\code{nE_total}}{Total number of edges across all components.}

    \item{\code{edge_offsets}}{Integer vector of length \code{n} giving the
cumulative number of edges in components before each one. The
global edge number of local edge \code{e} in component \code{k} is
\code{edge_offsets[k] + e}.
Create metric graphs for connected components}
  }
  \if{html}{\out{</div>}}
}
\section{Methods}{
\subsection{Public methods}{
  \itemize{
    \item \href{#method-graph_components-initialize}{\code{graph_components$new()}}
    \item \href{#method-graph_components-edge_to_component}{\code{graph_components$edge_to_component()}}
    \item \href{#method-graph_components-get_largest}{\code{graph_components$get_largest()}}
    \item \href{#method-graph_components-as_metric_graph}{\code{graph_components$as_metric_graph()}}
    \item \href{#method-graph_components-which_component}{\code{graph_components$which_component()}}
    \item \href{#method-graph_components-add_observations}{\code{graph_components$add_observations()}}
    \item \href{#method-graph_components-clear_observations}{\code{graph_components$clear_observations()}}
    \item \href{#method-graph_components-get_data}{\code{graph_components$get_data()}}
    \item \href{#method-graph_components-get_groups}{\code{graph_components$get_groups()}}
    \item \href{#method-graph_components-get_PtE}{\code{graph_components$get_PtE()}}
    \item \href{#method-graph_components-coordinates}{\code{graph_components$coordinates()}}
    \item \href{#method-graph_components-build_mesh}{\code{graph_components$build_mesh()}}
    \item \href{#method-graph_components-compute_fem}{\code{graph_components$compute_fem()}}
    \item \href{#method-graph_components-compute_geodist}{\code{graph_components$compute_geodist()}}
    \item \href{#method-graph_components-compute_resdist}{\code{graph_components$compute_resdist()}}
    \item \href{#method-graph_components-compute_laplacian}{\code{graph_components$compute_laplacian()}}
    \item \href{#method-graph_components-plot_function}{\code{graph_components$plot_function()}}
    \item \href{#method-graph_components-plot}{\code{graph_components$plot()}}
    \item \href{#method-graph_components-clone}{\code{graph_components$clone()}}
  }
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-initialize"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-initialize}{}}}
\subsection{\code{graph_components$new()}}{
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$new(
  edges = NULL,
  V = NULL,
  E = NULL,
  by_length = TRUE,
  edge_weights = NULL,
  ...,
  lines = deprecated()
)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{edges}}{A list containing coordinates as \verb{m x 2} matrices (that is,
of \code{matrix} type) or m x 2 data frames (\code{data.frame} type) of sequence of
points connected by straightlines. Alternatively, you can also prove an
object of type \code{SpatialLinesDataFrame} or \code{SpatialLines} (from \code{sp} package)
or \code{MULTILINESTRING} (from \code{sf} package).}
      \item{\code{V}}{n x 2 matrix with Euclidean coordinates of the n vertices.}
      \item{\code{E}}{m x 2 matrix where each row represents an edge.}
      \item{\code{by_length}}{Sort the components by total edge length? If \code{FALSE},
the components are sorted by the number of vertices.}
      \item{\code{edge_weights}}{Either a number, a numerical vector with length given
by the number of edges, providing the edge weights, or a \code{data.frame} with
the number of rows being equal to the number of edges, where}
      \item{\code{...}}{Additional arguments used when specifying the graphs}
      \item{\code{lines}}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Use \code{edges} instead.}
      \item{\code{vertex_unit}}{The unit in which the vertices are specified.
The options are 'degree' (the great circle distance in km), 'km', 'm' and
'miles'. The default is \code{NULL}, which means no unit. However, if you set
\code{length_unit}, you need to set \code{vertex_unit}.}
      \item{\code{length_unit}}{The unit in which the lengths will be computed.
The options are 'km', 'm' and 'miles'. The default is \code{vertex_unit}.
Observe that if \code{vertex_unit} is \code{NULL}, \code{length_unit} can only be \code{NULL}.
If \code{vertex_unit} is 'degree', then the default value for \code{length_unit} is 'km'.}
      \item{\code{longlat}}{If TRUE, then it is assumed that the coordinates are given.
in Longitude/Latitude and that distances should be computed in meters.
It takes precedence over \code{vertex_unit} and \code{length_unit}, and is equivalent
to \code{vertex_unit = 'degree'} and \code{length_unit = 'm'}.}
      \item{\code{tolerance}}{Vertices that are closer than this number are merged when
constructing the graph (default = 1e-10). If \code{longlat = TRUE}, the
tolerance is given in km.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    A \code{graph_components} object.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-edge_to_component"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-edge_to_component}{}}}
\subsection{\code{graph_components$edge_to_component()}}{
  Map global edge numbers to component indices.
Each edge in the disconnected graph has a unique global edge
number; this method returns the component each edge belongs to.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$edge_to_component(edge_number)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{edge_number}}{Integer vector of global edge numbers in
\code{1:self$nE_total}.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    Integer vector of component indices, the same length as
\code{edge_number}.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-get_largest"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-get_largest}{}}}
\subsection{\code{graph_components$get_largest()}}{
  Returns the largest component in the graph.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$get_largest()}
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    A \code{metric_graph} object.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-as_metric_graph"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-as_metric_graph}{}}}
\subsection{\code{graph_components$as_metric_graph()}}{
  Combine all components into a single (disconnected)
\code{metric_graph} object via fast in-memory stacking.
Edges keep their relative order within each component, and the
\code{.edge_number} of every observation is shifted by the cumulative
edge count of preceding components. The resulting graph carries
a \code{disconnected = TRUE} flag (queryable via
\code{metric_graph$is_disconnected()}); calling
\code{add_observations()} on the returned graph is disallowed because
the user-facing edge numbering is no longer the per-component
one — add observations to the original \code{graph_components} and
call \code{as_metric_graph()} again.

Call this method explicitly before passing to repeated
downstream operations (e.g., \code{graph_lme}, \code{graph_spde},
\code{sample_spde}) to amortise the assembly cost across calls.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$as_metric_graph()}
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    A \code{metric_graph} object representing the disjoint union
of the components, with mesh and FEM matrices block-diagonally
stacked when every component has them.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-which_component"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-which_component}{}}}
\subsection{\code{graph_components$which_component()}}{
  For each spatial point, determine which component it
belongs to. The component is the one whose nearest network location
is closest in Euclidean distance to the point.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$which_component(XY)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{XY}}{An \verb{n x 2} matrix of spatial coordinates.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    An integer vector of length \code{n} with the component index
for each point.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-add_observations"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-add_observations}{}}}
\subsection{\code{graph_components$add_observations()}}{
  Add observations to the components. Mirrors
\code{metric_graph$add_observations}. For \code{data_coords = "spatial"},
each observation is routed to the component whose nearest network
location is closest to it. For \code{data_coords = "PtE"}, the data
specifies a global \code{edge_number} (in \code{1:self$nE_total}) and the
component is inferred automatically from it.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$add_observations(
  data = NULL,
  edge_number = "edge_number",
  distance_on_edge = "distance_on_edge",
  coord_x = "coord_x",
  coord_y = "coord_y",
  data_coords = c("PtE", "spatial"),
  group = NULL,
  normalized = FALSE,
  clear_obs = FALSE,
  verbose = 1,
  suppress_warnings = FALSE,
  ...
)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{data}}{A \code{data.frame}, list, \code{sf} object, or
\code{SpatialPointsDataFrame} with the observations.}
      \item{\code{edge_number}}{Name of the (global) edge-number column.
Default is \code{"edge_number"}.}
      \item{\code{distance_on_edge}}{Name of the distance-on-edge column.
Default is \code{"distance_on_edge"}.}
      \item{\code{coord_x}}{Name of the x-coordinate column. Default is
\code{"coord_x"}.}
      \item{\code{coord_y}}{Name of the y-coordinate column. Default is
\code{"coord_y"}.}
      \item{\code{data_coords}}{Either \code{"PtE"} (the convention is then
\verb{(edge_number, distance_on_edge)} with global edge numbering) or
\code{"spatial"}.}
      \item{\code{group}}{Optional grouping variable, see
\code{metric_graph$add_observations}.}
      \item{\code{normalized}}{If TRUE, distances are assumed normalized to
(0,1).}
      \item{\code{clear_obs}}{If TRUE, all existing observations are cleared
first.}
      \item{\code{verbose}}{Verbosity level.}
      \item{\code{suppress_warnings}}{If TRUE, warnings from the per-component
add_observations are suppressed.}
      \item{\code{...}}{Additional arguments forwarded to each component's
\code{add_observations} method.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    No return value. Called for its side effects.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-clear_observations"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-clear_observations}{}}}
\subsection{\code{graph_components$clear_observations()}}{
  Clear observations from all components.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$clear_observations()}
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    No return value. Called for its side effects.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-get_data"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-get_data}{}}}
\subsection{\code{graph_components$get_data()}}{
  Combine observations from all components.
Returns a single data structure with an additional \code{.component}
column indicating which component each row belongs to.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$get_data(
  group = NULL,
  format = c("tibble", "sf", "sp", "list"),
  drop_na = FALSE,
  drop_all_na = TRUE
)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{group}}{Optional group filter passed to each component's
\code{get_data}.}
      \item{\code{format}}{One of \code{"tibble"}, \code{"sf"}, \code{"sp"}, \code{"list"}.}
      \item{\code{drop_na}}{See \code{metric_graph$get_data}.}
      \item{\code{drop_all_na}}{See \code{metric_graph$get_data}.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    A combined data object with a \code{.component} column.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-get_groups"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-get_groups}{}}}
\subsection{\code{graph_components$get_groups()}}{
  Get the unique groups across all components.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$get_groups()}
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    Character vector of unique group identifiers.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-get_PtE"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-get_PtE}{}}}
\subsection{\code{graph_components$get_PtE()}}{
  Get the (edge_number, distance_on_edge) pairs for
the observations across all components, using global edge
numbering.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$get_PtE()}
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    A matrix with two columns: \code{edge_number},
\code{distance_on_edge}.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-coordinates"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-coordinates}{}}}
\subsection{\code{graph_components$coordinates()}}{
  Convert between graph coordinates (global
\code{edge_number}, \code{distance_on_edge}) and spatial coordinates.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$coordinates(PtE = NULL, XY = NULL, normalized = TRUE)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{PtE}}{A matrix or vector with two columns/entries:
\verb{(edge_number, distance_on_edge)}. Edge numbers are global
across components.}
      \item{\code{XY}}{An \verb{n x 2} matrix of spatial coordinates.}
      \item{\code{normalized}}{If TRUE, the distances are normalized to (0,1).}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    If \code{PtE} is supplied, an \verb{n x 2} matrix of spatial
coordinates. If \code{XY} is supplied, an \verb{n x 2} matrix with
\verb{(edge_number, distance_on_edge)} using global edge numbering.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-build_mesh"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-build_mesh}{}}}
\subsection{\code{graph_components$build_mesh()}}{
  Build a mesh on each component.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$build_mesh(...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{...}}{Arguments forwarded to \code{metric_graph$build_mesh}.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    No return value. Called for its side effects.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-compute_fem"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-compute_fem}{}}}
\subsection{\code{graph_components$compute_fem()}}{
  Compute finite-element matrices on each component
that has a mesh.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$compute_fem(...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{...}}{Arguments forwarded to \code{metric_graph$compute_fem}.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    No return value. Called for its side effects.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-compute_geodist"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-compute_geodist}{}}}
\subsection{\code{graph_components$compute_geodist()}}{
  Compute geodesic distances per component. The
geodesic distance between vertices in different components is
infinite, so the per-component computation gives well-defined
results. The distances are stored on each component's
\code{metric_graph} object (in \code{geo_dist}); when \code{as_metric_graph()}
is subsequently called, they are stacked into a combined
distance matrix with \code{Inf} cross-component entries.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$compute_geodist(...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{...}}{Arguments forwarded to \code{metric_graph$compute_geodist}.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    No return value. Called for its side effects.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-compute_resdist"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-compute_resdist}{}}}
\subsection{\code{graph_components$compute_resdist()}}{
  Compute resistance distances per component.
Resistance distance is undefined (infinite) between vertices in
different components, so per-component computation is the only
way to get well-defined values on a disconnected graph.
Stacking via \code{as_metric_graph()} produces a combined matrix
with \code{Inf} cross-component entries, making
\code{graph_lme(model = "isoExp")} and similar isotropic models
fit per-component automatically.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$compute_resdist(...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{...}}{Arguments forwarded to \code{metric_graph$compute_resdist}.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    No return value. Called for its side effects.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-compute_laplacian"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-compute_laplacian}{}}}
\subsection{\code{graph_components$compute_laplacian()}}{
  Compute the (weighted) graph Laplacian per
component. The combined Laplacian on the disjoint union is
block-diagonal in the per-component Laplacians, so
\code{as_metric_graph()} simply stacks them via \code{Matrix::bdiag()}.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$compute_laplacian(...)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{...}}{Arguments forwarded to \code{metric_graph$compute_laplacian}.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    No return value. Called for its side effects.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-plot_function"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-plot_function}{}}}
\subsection{\code{graph_components$plot_function()}}{
  Plot a function on the components. Mirrors
\code{metric_graph$plot_function}. When supplying \code{newdata}, it must
include \code{.edge_number} (global edge numbering) and
\code{.distance_on_edge}; the component for each row is inferred from
the global edge number.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$plot_function(
  data = NULL,
  newdata = NULL,
  group = 1,
  type = c("ggplot", "plotly"),
  continuous = TRUE,
  p = NULL,
  ...
)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{data}}{Column name of the stored observations to plot.}
      \item{\code{newdata}}{Optional \code{metric_graph_data} with \code{.edge_number}
(global), \code{.distance_on_edge}, and the value column.}
      \item{\code{group}}{Group identifier passed to each component.}
      \item{\code{type}}{Plot type: \code{"ggplot"} or \code{"plotly"}.}
      \item{\code{continuous}}{See \code{metric_graph$plot_function}.}
      \item{\code{p}}{Optional existing plot to add to.}
      \item{\code{...}}{Additional arguments forwarded to each component's
\code{plot_function}.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    A plot object.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-plot"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-plot}{}}}
\subsection{\code{graph_components$plot()}}{
  Plots all components.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$plot(
  edge_colors = NULL,
  vertex_colors = NULL,
  data = NULL,
  ...
)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{edge_colors}}{A 3 x nc matrix with RGB values for the edge colors to
be used when plotting each graph.}
      \item{\code{vertex_colors}}{A 3 x nc matrix with RGB values for the edge colors to
be used when plotting each graph.}
      \item{\code{data}}{Optional column name of the stored observations to
plot. Components without that column are skipped.}
      \item{\code{...}}{Additional arguments for plotting the individual graphs.}
    }
    \if{html}{\out{</div>}}
  }
  \subsection{Returns}{
    A \code{ggplot} object.
  }
}

\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-graph_components-clone"></a>}}
\if{latex}{\out{\hypertarget{method-graph_components-clone}{}}}
\subsection{\code{graph_components$clone()}}{
  The objects of this class are cloneable with this method.
  \subsection{Usage}{
    \if{html}{\out{<div class="r">}}
    \preformatted{graph_components$clone(deep = FALSE)}
    \if{html}{\out{</div>}}
  }
  \subsection{Arguments}{
    \if{html}{\out{<div class="arguments">}}
    \describe{
      \item{\code{deep}}{Whether to make a deep clone.}
    }
    \if{html}{\out{</div>}}
  }
}

}
