| CographLayout | R Documentation |
Class for managing layout algorithms and computing node positions.
A CographLayout R6 object.
new()Create a new CographLayout object.
CographLayout$new(type = "circle", ...)
typeLayout name. One of the names returned by
list_layouts(), or "custom" together with a coords argument.
...Additional parameters stored and passed to the layout function.
A new CographLayout object.
compute()Compute layout coordinates for a network.
CographLayout$compute(network, ...)
networkA CographNetwork or cograph_network object.
...Additional parameters passed to the layout function. They
override parameters given to $new().
A data frame with columns x and y, one row per node, rescaled
by $normalize_coords().
normalize_coords()Rescale coordinates into the unit square. Both axes are
scaled by the same factor, so the larger spread spans
[padding, 1 - padding] and the layout is centered at 0.5.
CographLayout$normalize_coords(coords, padding = 0.1)
coordsMatrix or data frame. Columns x and y are used, or the
first two columns when these names are absent.
paddingNumeric. Margin left on each side of the larger spread.
A data frame with rescaled x and y columns.
get_type()Get layout type.
CographLayout$get_type()
A character string.
get_params()Get layout parameters.
CographLayout$get_params()
A list of the parameters given to $new().
print()Print layout summary.
CographLayout$print()
The object itself, invisibly.
clone()The objects of this class are cloneable with this method.
CographLayout$clone(deep = FALSE)
deepWhether to make a deep clone.
layout <- CographLayout$new("circle")
layout$compute(CographNetwork$new(regulation_net))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.