View source: R/05.network&graph.R
| FF.graph.custom | R Documentation |
igraphCreate an object of class graph from the package igraph using a FF matrix of class financial_matrix
FF.graph.custom(
x,
vertex.size = NULL,
vertex.colour = NULL,
edge.width = NULL,
edge.greyscale = NULL,
directed = TRUE,
loops = FALSE,
weighted = any(x@M %in% c(0, 1)),
...
)
x |
A matrix-like object produced by |
vertex.size |
Which piece of information on the firms should be used to represent the nodes' size (see Details). |
vertex.colour |
Which piece of information on the firms should be used to represent the nodes' colours (see Details). |
edge.width |
Whether to use the edges' width to represent tie strength. Defaults to |
edge.greyscale |
Whether to use the edges' colour to represent tie strength through a grey scale. Defaults to |
directed |
Whether the network should be directed. Defaults to |
loops |
Whether the network should have loops. Defaults to |
weighted |
Whether the ties/edges should be weighted. Defaults to |
... |
Aliases to the other parameters and additional settings (see Details). |
This function allows for a number of additional arguments.
A network in the desired format
vertex.colour and vertex.sizeThe pieces of information that is possible to pass to vertex.size and vertex.colour are:
capitalisation, will be arranged into steps (see capitalisation.bins below)
revenue, will be arranged into steps (see revenues.bins below)
legal_form
sector
currency
edge.width and edge.greyscaleThe pieces of information that is possible to pass to edge.width and edge.greyscale are:
capitalisation
revenue
vertex.sizeThe effect of the additional parameters that modify the behaviour of vertex.size are:
vertex.size.max (defaults to 5) :
if vertex.size or one of its aliases is specified, this is the size of the biggest vertex;
if neither vertex.size nor any of its aliases is given, this is the size of ALL vertices.
vertex.size.min (defaults to 1):
if vertex.size or one of its aliases is specified, this is the size of the smallest vertex;
if neither vertex.size nor any of its aliases is given, it is ignored.
vertex.colourThe only additional parameter related to vertex.colour is vertex.colour.palette.
It supports a vector of RGB or named colours (see colours for all named colours in R).
It also accepts complete calls to functions that return a such a vector like RColorBrewer::brewer.pal(n, name) or viridisLite::viridis(n, option).
If the palette is too short, it will be extended automatically using colorRampPalette.
If the palette is not declared, but this arguemnt is TRUE, it will defaulr to the following vector of colours:
#00204D, Oxford Blue
#31446B, Police Blue
#666970, Dim Grey
#958F78, Artichoke
#CBBA69, Dark Khaki
#FFEA46, Gargoyle Gas
If the argument is FALSE, NULL or NA, the vertex will be coloured of #081677 (Gentian blue).
edge.widthedge.width.max (defaults to 5) :
if edge.width or one of its aliases is specified, this is the thickness of the thickest edge;
if neither edge.width nor any of its aliases is given, this is the thickness of ALL edges
edge.width.min (defaults to 1):
if edge.width or one of its aliases is specified, this is the thickness of the slimmest edge;
if neither edge.width nor any of its aliases is given, it is ignored.
edge.greyscaleedge.greyscale.darkest (defaults to 5) :
if edge.greyscale or one of its aliases is specified, this is the thickness of the thickest edge;
if neither edge.greyscale nor any of its aliases is given, this is the thickness of ALL edges
edge.greyscale.fairest (defaults to 1):
if edge.greyscale or one of its aliases is specified, this is the thickness of the slimmest edge;
if neither edge.greyscale nor any of its aliases is given, it is ignored.
Several aliases are accepted for all arguments, except M:
for vertex.size: node.size
for vertex.colour: vertex.color, node.colour, and node.color;
for edge.width: tie.width
for edge.greyscale: tie.grayscale, tie.greyscale, and edge.grayscale
Telarico, Fabio Ashtar
FF.net FF.net.custom FF.graph
# Create the graph representation of the binary FF of
# Berkshire Hataway's holdings based on common ownership
data("firms_BKB")
x <- FF.naive.ownership(firms_BKB)
FF.graph.custom(x = x, node.size = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.