AbstractGraph | 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.
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 in DirectedGraphMeasures for details about each measure.
available_graph_measures
character vector of all supported graph measures. See Graph Measures section in DirectedGraphMeasures for details about each measure. Read-only.
default_node_measures
character vector of default node measures. See Node Measures section in DirectedGraphMeasures for details about each measure.
default_graph_measures
character vector of default graph measures. See Graph Measures section in DirectedGraphMeasures for details about each measure. Read-only.
new()
Instantiate new object of the class.
AbstractGraph$new(nodes, edges)
nodes
a data.table containing nodes
edges
a data.table containing edges
Self, invisibly.
node_measures()
Return specified node-level measures, calculating if necessary. See Node Measures section in DirectedGraphMeasures for details about each measure.
AbstractGraph$node_measures(measures = NULL)
measures
character vector of measure names. Default NULL will return those that are already calculated.
a data.table with specified node meaures as columns
graph_measures()
Return specified graph-level measures, calculating if necessary. See Graph Measures section in DirectedGraphMeasures for details about each measure.
AbstractGraph$graph_measures(measures = NULL)
measures
character vector of measure names. Default NULL will return those that are already calculated.
list with specified graph measures.
print()
print igraph object
AbstractGraph$print()
Self, invisibly.
clone()
The objects of this class are cloneable with this method.
AbstractGraph$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.