% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/provenance-helpers.R
\name{my_union_graph}
\alias{my_union_graph}
\title{Union of graphs}
\usage{
my_union_graph(...)
}
\arguments{
\item{...}{igraph-class graphs to be joined}
}
\value{
Returns (invisibly) a new igraph-class graph that is a union and/or disjoint union of the input graphs
}
\description{
Performs union of multiple graphs, internally controlling for possible common nodes
}
\examples{
require(igraph)
# A disjoint union
g1 <- make_graph(c("1", "2", "2", "3", "3", "4", "4", "5", "4", "6"), directed = TRUE)
plot(g1)
g2 <- make_graph(c("7", "8", "8", "9", "9", "10", "9", "11"), directed = TRUE)
plot(g2)
g <- my_union_graph(g1, g2)
plot(g)
# A union of multiple graphs (one disjoint, two connected)
g3 <- make_graph(c("11", "10", "11", "12", "12", "13"), directed = TRUE)
plot(g3)
g <- my_union_graph(g1, g2, g3)
plot(g)
# A complete union of graphs
g4 <- make_graph(c("11", "1", "11", "10", "11", "12", "12", "13", "3", "12"), directed = TRUE)
g <- my_union_graph(g1, g2, g3, g4)
plot(g)
}
\author{
J Bedia
}
\keyword{internal}
