The function setGraph sets the name of the gGraph object linked to a
gData object. It validates that the named object exists in
the global environment and is a valid gGraph.
See also
getGraph to retrieve the linked graph. gData for
the class definition.
Other accessor_methods:
getColors(),
getCoords(),
getCosts(),
getData(),
getEdges(),
getGraph(),
getNodes(),
getNodesAttr(),
setColors()
Examples
myGraph <- dropCosts(rawgraph.40k)
hgdp2 <- setGraph(hgdp, "myGraph")
#> Error in setGraph(hgdp, "myGraph"): gGraph object myGraph not found in global environment.
getGraph(hgdp2)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'getGraph': object 'hgdp2' not found
