Check if the network is weighted
is_weighted(x)
TRUE
or FALSE
This function checks if x
is a weighted network.
For an x of class igraph
or network
, the function checks
for the appropiate attribute in the graph x.
For a matrix
the function returns TRUE
if any of the
elements is not or 1.
For a data.frame
the function returns TRUE
if it contains
a numeric column called "weight", in addition to the first two columns
of senders and receivers.