| CographNetwork | R Documentation |
Core class representing a network for visualization. Stores nodes, edges, layout coordinates, and aesthetic mappings.
A CographNetwork R6 object.
n_nodesNumber of nodes in the network.
n_edgesNumber of edges in the network.
is_directedWhether the network is directed.
has_weightsTRUE when any edge weight differs from 1.
node_labelsVector of node labels, taken from the labels column
of the node table when present and from label otherwise.
new()Create a new CographNetwork object.
CographNetwork$new( input = NULL, directed = NULL, nodes = NULL, simplify = FALSE )
inputNetwork input, such as a matrix, edge list, igraph,
statnet network, qgraph or tna object. NULL creates an empty object.
directedLogical. Forces a directed or undirected interpretation.
NULL detects it from the input.
nodesNULL or a data frame of node attributes. Its rows are
matched to the node labels by a name, label or id column, tried in
that order, and the remaining columns are added to the node table. When
no column matches and the row count equals the number of nodes, the
columns are added in row order. A labels column supplies the display
labels returned by $node_labels.
simplifyLogical or character. If FALSE (default), every transition from tna sequence data is a separate edge. If TRUE or a string ("sum", "mean", "max", "min"), duplicate transitions are aggregated. Other inputs are not affected.
A new CographNetwork object.
clone_network()Create a copy with the same nodes, edges, weights, layout, aesthetics, theme, layout information and plot parameters.
CographNetwork$clone_network()
A new CographNetwork object.
set_nodes()Set nodes data frame.
CographNetwork$set_nodes(nodes)
nodesData frame with node information.
The object itself, invisibly.
set_edges()Set edges data frame.
CographNetwork$set_edges(edges)
edgesData frame with edge information.
The object itself, invisibly.
set_directed()Set directed flag.
CographNetwork$set_directed(directed)
directedLogical.
The object itself, invisibly.
set_weights()Set edge weights.
CographNetwork$set_weights(weights)
weightsNumeric vector of edge weights, one per edge.
The object itself, invisibly.
set_layout_coords()Set layout coordinates.
CographNetwork$set_layout_coords(coords)
coordsMatrix or data frame with at least two columns and one row
per node. The first two columns are renamed x and y and are also
written to the node table. NULL leaves the layout unchanged.
The object itself, invisibly.
set_node_aes()Set node aesthetics. The list is merged into the current node aesthetics.
CographNetwork$set_node_aes(aes)
aesNamed list of aesthetic parameters.
The object itself, invisibly.
set_edge_aes()Set edge aesthetics. The list is merged into the current edge aesthetics.
CographNetwork$set_edge_aes(aes)
aesNamed list of aesthetic parameters.
The object itself, invisibly.
set_theme()Set theme.
CographNetwork$set_theme(theme)
themeCographTheme object or theme name.
The object itself, invisibly.
get_nodes()Get nodes data frame.
CographNetwork$get_nodes()
Data frame with node information.
get_edges()Get edges data frame.
CographNetwork$get_edges()
Data frame with edge information.
get_layout()Get layout coordinates.
CographNetwork$get_layout()
A data frame with x and y columns, or NULL when no layout
is set.
get_node_aes()Get node aesthetics.
CographNetwork$get_node_aes()
List of node aesthetic parameters.
get_edge_aes()Get edge aesthetics.
CographNetwork$get_edge_aes()
List of edge aesthetic parameters.
get_theme()Get theme.
CographNetwork$get_theme()
The stored theme (a CographTheme object or theme name), or
NULL.
set_layout_info()Set layout info.
CographNetwork$set_layout_info(info)
infoList with layout information (name, seed, etc.).
The object itself, invisibly.
get_layout_info()Get layout info.
CographNetwork$get_layout_info()
List with layout information.
set_plot_params()Set plot parameters.
CographNetwork$set_plot_params(params)
paramsList of all plot parameters used.
The object itself, invisibly.
get_plot_params()Get plot parameters.
CographNetwork$get_plot_params()
List of plot parameters.
print()Print network summary.
CographNetwork$print()
The object itself, invisibly.
clone()The objects of this class are cloneable with this method.
CographNetwork$clone(deep = FALSE)
deepWhether to make a deep clone.
CographNetwork$new(regulation_net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.