returnEdgeList         package:dynamicGraph         R Documentation

_C_l_a_s_s "_d_g._V_e_r_t_e_x_E_d_g_e_L_i_s_t": _T_h_e _e_d_g_e _l_i_s_t

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

     Return a list of edges, each of class containing 'dg.VertexEdge'.

     Objects can be created by calls of the form
     'new("dg.VertexEdgeList", ...)'.

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

     returnEdgeList(edge.list, vertices, width = 2, color = "DarkSlateGrey", N = 3, 
                    oriented = NA, types = NULL, edgeClasses = validEdgeClasses())

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

edge.list: A list of vectors identifying the edges. Each vector of
          'edge.list' should be a vector of  integers giving the
          indices of the vertices of an edge, or  a vector of text
          strings with the names of the vertices.

vertices: The list of 'vertices',  each of a class containing
          'dg.Vertex'. 'vertices' are used to set the initial labels of
          the edges.

   width: A single numeric with the initial 'width' of the edges. 

   color: A single text string giving the 'color' of the edges. 

oriented: Logical, if TRUE then the edges are 'oriented'. 

   types: A vector of text strings giving the 'types' of the edges,
          identify which classes the edges should be of, containing the
          'dg.VertexEdge'. 

       N: Integer, 'N' is the number of coordinates of the vertices. 

edgeClasses: Returned value from 'validEdgeClasses', or extension of
          this matrix. 

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

     A list of edges, each of class containing 'dg.VertexEdge'.

_S_l_o_t_s:

     '._D_a_t_a': Object of class '"list"'. 

_E_x_t_e_n_d_s:

     Class '"dg.EdgeList"', directly. Class '"dg.list"', directly.
     Class '"list"', from data part. Class '"dg.NodeList"', by class
     '"dg.EdgeList"'. Class '"vector"', by class '"dg.EdgeList"'. Class
     '"vector"', by class '"dg.list"'. Class '"vector"', by class
     '"list"'.

_M_e_t_h_o_d_s:

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "dg.VertexEdgeList")': ... 

_N_o_t_e:

     Beside the methods of the vertex list, 'vertexList', (except
     'Positions', 'Indices' and 'Strata') the edge list also has the
     methods 'NodeTypes', 'NodeIndices', 'Widths', 'Widths<-',
     'Dashes', 'Dashes<-', 'Oriented', and 'Oriented<-'.

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

     Jens Henrik Badsberg

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

     'vertexList' and 'dg.VertexEdge-class'.

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

     from <- c("contry", "contry", "race", "race",       "sex",  "sex")
     to   <- c(   "sex",   "race", "hair",  "eye", "education",  "age")
     vertexnames <- unique(sort(c(from, to)))
     vertices <- returnVertexList(vertexnames)
     # from <- match(from, vertexnames)
     # to <- match(to, vertexnames)
     edge.list <- vector("list", length(to))
     for (j in seq(along = to)) edge.list[[j]] <- c(from[j], to[j])

     edges <- returnEdgeList(edge.list, vertices, color = "red", oriented = TRUE)

     edges <- new("dg.VertexEdgeList", edge.list = edge.list,
                  vertices = vertices, color = "red", oriented = TRUE)

     Names(edges)
     Colors(edges)
     Labels(edges)
     LabelPositions(edges)
     # Positions(edges)
     # Strata(edges)
     # Indices(edges)
     str(NodeTypes(edges))
     str(NodeIndices(edges))
     Dashes(edges)
     Widths(edges)
     Oriented(edges)
     Widths(edges) <- rep(1, 7)
     Widths(edges) <- rep(1, 6)
     Widths(edges)
     asDataFrame(edges)

