View source: R/sna-operators.R
gliop | R Documentation |
gliop
is a wrapper which allows for an arbitrary binary operation on GLIs to be treated as a single call. This is particularly useful for test routines such as cugtest
and qaptest
.
gliop(dat, GFUN, OP="-", g1=1, g2=2, ...)
dat |
a collection of graphs. |
GFUN |
a function taking single graphs as input. |
OP |
the operator to use on the output of |
g1 |
the index of the first input graph. |
g2 |
the index of the second input graph. |
... |
Additional arguments to |
gliop
operates by evaluating GFUN
on the graphs indexed by g1
and g2
and returning the result of OP
as applied to the GFUN
output.
OP(GFUN(dat[g1, , ],...),GFUN(dat[g2, , ],...))
If the output of GFUN
is not sufficiently well-behaved, undefined behavior may occur. Common sense is advised.
Carter T. Butts buttsc@uci.edu
Anderson, B.S.; Butts, C.T.; and Carley, K.M. (1999). “The Interaction of Size and Density with Graph-Level Indices.” Social Networks, 21(3), 239-267.
cugtest
, qaptest
#Draw two random graphs
g<-rgraph(10,2,tprob=c(0.2,0.5))
#What is their difference in density?
gliop(g,gden,"-",1,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.