getNodesAttr | R Documentation |
The function getNodesAttr
returns the values of a set of variables
associated to the nodes (i.e. node attributes) of a gGraph or
gData object.
getNodesAttr(x, ...)
## S4 method for signature 'gGraph'
getNodesAttr(x, nodes = NULL, attr.name = NULL, ...)
## S4 method for signature 'gData'
getNodesAttr(x, attr.name = NULL, ...)
x |
a valid gGraph or gData object. |
... |
other arguments passed to other methods (currently unused). |
nodes |
an optional integer, logical, or character string indicating the subset of nodes to be used. If NULL, all nodes are used. |
attr.name |
an optional character string indicating which node
attributes should be returned. If provided, it must match at least one of
the columns of |
A data.frame with the requested nodes attributes. Nodes are displayed in rows, variables in columns.
getNodesAttr(gGraph)
: Method for gGraph objects
getNodesAttr(gData)
: Method for gData objects
Most other accessors are documented in gGraph and
gData manpages.
## gGraph method
head(getNodesAttr(worldgraph.40k))
## gData method
getNodesAttr(hgdp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.