| is_weighted.default {SeqNet} | R Documentation |
Check if an object is weighted
## Default S3 method: is_weighted(x, ...)
x |
Either a 'network', 'network_module', or 'matrix' object. |
... |
Additional arguments.
object are weighted by 0s and 1s, and returns |
A Boolean value indicating whether the input is weighted.
# Create a random network with 10 nodes. nw <- random_network(10) # The network, and hence all of its modules, are unweighted. is_weighted(nw) sapply(nw$modules, is_weighted) # Add random weights to the connections. nw <- gen_partial_correlations(nw) # The network, and hence all of its modules, are now weighted. is_weighted(nw) sapply(nw$modules, is_weighted)