gliop                  package:sna                  R Documentation

_R_e_t_u_r_n _a _B_i_n_a_r_y _O_p_e_r_a_t_i_o_n _o_n _G_L_I _V_a_l_u_e_s _C_o_m_p_u_t_e_d _o_n _T_w_o _G_r_a_p_h_s

_D_e_s_c_r_i_p_t_i_o_n:

     `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'.

_U_s_a_g_e:

     gliop(dat, GFUN, OP="-", g1=1, g2=2, ...)

_A_r_g_u_m_e_n_t_s:

     dat: A graph stack 

    GFUN: A function taking single graphs as input 

      OP: The operator to use on the output of `GFUN' 

      g1: The index of the first input graph 

      g2: The index of the second input graph 

     ...: Additional arguments to `GFUN' 

_D_e_t_a_i_l_s:

     `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.

_V_a_l_u_e:

     `OP(GFUN(dat[g1, , ],...),GFUN(dat[g2, , ],...))'

_N_o_t_e:

     If the output of `GFUN' is not sufficiently well-behaved,
     undefined behavior may occur.  Common sense is advised.

_A_u_t_h_o_r(_s):

     Carter T. Butts ctb@andrew.cmu.edu

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     `cugtest', `qaptest'

_E_x_a_m_p_l_e_s:

     #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)

