%*% | R Documentation |
Matrix multiplication methods, including diffnet
objects. This function creates a generic method for %*%
allowing for multiplying diffnet objects.
x %*% y
## Default S3 method:
x %*% y
## S3 method for class 'diffnet'
x %*% y
x |
Numeric or complex matrices or vectors, or |
y |
Numeric or complex matrices or vectors, or |
This function can be usefult to generate alternative graphs, for
example, users could compute the n-steps graph by doing net %*% net
(see examples).
In the case of diffnet
objects performs matrix multiplication
via mapply
using x$graph
and y$graph
as arguments,
returnling a diffnet
. Otherwise returns the default according to
%*%
.
Other diffnet methods:
as.array.diffnet()
,
c.diffnet()
,
diffnet-arithmetic
,
diffnet-class
,
diffnet_index
,
plot.diffnet()
,
summary.diffnet()
# Finding the Simmelian Ties network ----------------------------------------
# Random diffnet graph
set.seed(773)
net <- rdiffnet(100, 4, seed.graph='small-world', rgraph.args=list(k=8))
netsim <- net
# According to Dekker (2006), Simmelian ties can be computed as follows
netsim <- net * t(net) # Keeping mutal
netsim <- netsim * (netsim %*% netsim)
# Checking out differences (netsim should have less)
nlinks(net)
nlinks(netsim)
mapply(`-`, nlinks(net), nlinks(netsim))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.