GraphClasses | R Documentation |
pkgnet uses R6 classes to define and encapsulate the graph
models for representing package networks. These classes implement
different types of graphs and functionality to calculate their respective
graph theory measures. The base class AbstractGraph
defines the
standard interfaces and functionality.
Currently the only implemented type of graph is DirectedGraph.
new(nodes, edges)
Instantiate new object of the class.
Args:
nodes
: a data.table containing nodes
edges
: a data.table containing edges
Returns:
Object of the class
node_measures(measures = NULL)
Return specified node-level measures, calculating if necessary. See Node Measures section below for details about each measure.
Args:
measures
: character vector of measure
names. Default NULL will return those that are already
calculated.
Returns:
data.table with specified node meaures as columns
graph_measures(measures = NULL)
Return specified graph-level measures, calculating if necessary. See Graph Measures section below for details about each measure.
Args:
measures
: character vector of measure
names. Default NULL will return those that are already
calculated.
Returns:
list with specified graph measures
nodes
node data.table, read-only
edges
edge data.table, read-only
igraph
igraph object, read-only
available_node_measures
character vector of all supported node measures. See Node Measures section below for detailed descriptions. Read-only.
available_graph_measures
character vector of all supported graph measures. See Graph Measures section below for detailed descriptions. Read-only.
default_node_measures
character vector of default node measures. See Node Measures section below for detailed descriptions. Read-only.
default_graph_measures
character vector of default graph measures. See Graph Measures section below for detailed descriptions. Read-only.
clone(deep = FALSE)
Method for copying an object. See Advanced R for the intricacies of R6 reference semantics.
Args:
deep
: logical. Whether to recursively clone nested R6 objects.
Returns:
Cloned object of this class.
print()
Print igraph object.
Returns:
Self
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.