Ragraph
is used to handle libgraph
representations of R graph objects.agopen
.agraph
:"externalptr"
: A C
based structure containing the libgraph informationlaidout
:"logical"
: Whether or
not this graph has been laid out or not.layoutType
:"character"
: The
layout method used for this objectedgemode
:"character"
: The
edgemode for this graph - directed or
undirectedAgNode
:"list"
: A list of
AgNode
objects.AgEdge
:"list"
: A list of
AgEdge
objects.boundBox
:"boundBox"
: Defines
the bounding box of the plot.bg
:"character"
: The background
color.fg
:"character"
: The foreground
color.signature(object = "Ragraph")
: A brief summary of
the contentssignature(object = "Ragraph")
: Returns the
external libgraph pointersignature(object = "Ragraph")
: Returns the
laidout
slotsignature(object = "Ragraph")
: Returns the
bounding box.signature(object = "Ragraph")
: Returns the edge
list.signature(object = "Ragraph")
: Returns the node
list.signature(object = "Ragraph")
: Retrieves the
edgemode of this object.signature(object = "Ragraph")
: Retrieves the
method used for the layout of this graph.signature(object = "Ragraph")
: Returns a
vector of the names of the edges in this graph.signature(self= "Ragraph")
:
Gets default attributes of the given graph.signature(self= "Ragraph", attr="vector", value="vector")
:
Sets default attributes of the given graph.signature(self= "Ragraph", attr="vector")
:
Gets attributes of the given graph.signature(self= "Ragraph", attr="vector", value="vector")
:
Sets attributes of the given graph.signature(self= "Ragraph", cluster="numeric", attr="vector")
:
Gets attributes of a cluster for the given graph.signature(self= "Ragraph", cluster="numeric", attr="vector", value="vector")
:
Sets attributes of a cluster for the given graph.signature(self= "Ragraph",attr="missing")
:
Gets default attributes of the given edge.signature(self= "Ragraph", attr="vector", value="vector")
:
Sets default attributes of the given edge.signature(self= "Ragraph", from="vector", to="vector", attr="vector")
:
Gets attributes of the given edge.signature(self= "Ragraph", from="vector", to="vector", attr="vector", value="vector")
:
Sets attributes of the given edge.signature(self= "Ragraph",attr="missing")
:
Gets default attributes of the given node.signature(self= "Ragraph", attr="vector", value="vector")
:
Sets default attributes of the given node.signature(self= "Ragraph", n="vector", attr="vector")
:
Gets attributes of the given node.signature(self= "Ragraph", n="vector", attr="vector", value="vector")
:
Sets attributes of the given node.signature(object = "Ragraph")
: Returns a two
element list, the first element contains a numerical vector with
the 'x' positions of every node in this graph, and the second
element contains a numerical vector with the 'y' positions for
every node in the graph.signature(object = "Ragraph")
: Returns a
vector with the heights of every node in the graphsignature(object = "Ragraph")
: Returns a
vector with the left width of every node in the graph.signature(object = "Ragraph")
: Returns a
vector with the right width of every node in the graph.agopen
set.seed(123)
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)
z <- agopen(g1,"foo")
z
## The various methods in action
## These methods are all used to obtain positional information about nodes
getNodeXY(z)
getNodeHeight(z)
getNodeLW(z)
getNodeRW(z)
## Retrieve information about the edges in the graph
edgeNames(z)
edgemode(z)
## These get information about the layout
laidout(z)
layoutType(z)
boundBox(z)
## Used to retrieve the entire list of edges or nodes
AgEdge(z)
AgNode(z)
Run the code above in your browser using DataLab