HOasso | R Documentation |
The function evalutes Higer Order Assortativity of complex networks represented by objects of class igraph
from the package of the same name.
HOasso(
g,
h = 1,
weighted = is.weighted(g),
x = c("sout", "dout", "lout", "sin", "din", "lin"),
y = c("sin", "din", "lin", "sout", "dout", "lout")
)
## S3 method for class 'assortativity'
plot(x,
type = "h",
ylim = c(-1, 1),
xlab = "Orders",
ylab = "Assortativity",
...
)
## S3 method for class 'assortativity'
print(x, ...)
g |
an object of class |
h |
an integer value, the function will evaluates the assortativity from the order 1 to the order |
weighted |
|
x |
In case of the |
y |
The second centrarlity measure, in-strength by default, see |
type |
Type of plot, histogram-like vertical lines by default. |
xlab |
A label for the x axis, |
ylab |
A label for the x axis, |
ylim |
The y limits of the plot, the assortativity index can assume only values between -1 and 1. |
... |
Other arguments of the |
Arguments x
and y are character
objects and can assume values "sout"
, "dout"
, "lout"
, "sin"
, "din"
, "lin"
representing the out-strength, out-degree, out-log-strength, in-strength, in-degree, and in-log-strength respectively.
In case of undirected graphs in- and out- centrality measures are equal. In case of unweighted graphs the strength is equal to the degree.
The function returns an object of class assortativity
subclass of a numeric
vector.
plot.assortativity
is identical to plot.default
but with different defaults in order to get a plot coherent with the assortativity index.
print.assortativity
is a method to show the assortativity values and the order side by syde.
A vector h
long containing the assortativity measures from the order 1 to the order h
.
arcagni2017higherHOasso
\insertRefarcagni2021extendingHOasso
\insertRefarcagni2023higherHOasso
g <- graph_from_data_frame(data.frame(
from = c("i", "j", "j", "k", "l"),
to = c("k", "k", "l", "l", "i"),
weight = c( 10, 5, 2, 3, 2 )
))
E(g)$label <- E(g)$weight
a <- HOasso(g, h = 10)
print(a)
plot(a, lwd = 3, panel.first = abline(h = 0, lty = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.