FF.graph.custom {FinNet} | R Documentation |
Represent a firm-firm (FF) network using the package igraph
Description
Create an object of class graph
from the package igraph
using a FF matrix of class financial_matrix
Usage
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)),
...
)
Arguments
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). |
Details
This function allows for a number of additional arguments.
Value
A network in the desired format
What can be passed to vertex.colour
and vertex.size
The pieces of information that is possible to pass to vertex.size
and vertex.colour
are:
-
capitalisation
, will be arranged into steps (seecapitalisation.bins
below) -
revenue
, will be arranged into steps (seerevenues.bins
below) -
legal_form
-
sector
-
currency
What can be passed to edge.width
and edge.greyscale
The pieces of information that is possible to pass to edge.width
and edge.greyscale
are:
-
capitalisation
-
revenue
Additional parameters related to vertex.size
The 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.
Additional parameters related to vertex.colour
The 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).
Additional parameters related to edge.width
edge.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.
Additional parameters related to edge.greyscale
edge.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
, andnode.color
;for
edge.width
:tie.width
for
edge.greyscale
:tie.grayscale
,tie.greyscale
, andedge.grayscale
Author(s)
Telarico, Fabio Ashtar
See Also
Examples
# 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)