Create a network (either an object of class network
from the package network
or a graph
object from the package igraph
) from a FF, FO, or FM matrix
get.net(
x,
vertex.size = NULL,
vertex.colour = NULL,
edge.width = NULL,
edge.greyscale = NULL,
format = c("igraph", "network"),
directed = TRUE,
loops = FALSE,
weighted = any(x@M %in% c(0, 1)),
...
)
A network in the desired format
A matrix-like object produced by FF
and related functions
Which piece of information on the firms should be used to represent the nodes' size (see Details).
Which piece of information on the firms should be used to represent the nodes' colours (see Details).
Whether to use the edges' width to represent tie strength. Defaults to FALSE
.
Whether to use the edges' colour to represent tie strength through a grey scale. Defaults to TRUE
if the matrix is valued.
Which format to use for the network. Possible values: igraph
or network
Whether the network should be directed. Defaults to TRUE
Whether the network should have loops. Defaults to FALSE
Whether the ties/edges should be weighted. Defaults to TRUE
if any element of the matrix equals neither 0 nor 1
Aliases to the other parameters and additional settings (see Details).
The 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
The pieces of information that is possible to pass to edge.width
and edge.greyscale
are:
- capitalisation
- revenue
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.
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 Gray
#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.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.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
This function allows for a number of additional arguments.
FF.net FF.net.custom FF.graph FF.graph.custom