"edges<-.GGobiData"          package:rggobi          R Documentation

_S_e_t _e_d_g_e_s

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

     Set edges for a dataset.

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

     "edges<-.GGobiData"(x, value)

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

       x: GGobiData

   value: matrix, data frame, or graph containing of edges.  First
          column should be from edge, second column to edge.

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

     In GGobi, and edge dataset is a special type of dataset that has
     two additional (hidden) columns which specification source and
     destination row names.  These rownames are compared to the row
     names of the dataset in the current plot, and if any match, it is
     possible to specify this dataset as an edge set to the plotted
     datset.  When this is done, edges will be drawn between points
     specified by the edge dataset.

     To remove edges, set edges to NULL.

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

     Hadley Wickham <h.wickham@gmail.com>

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

     'ggobi_longitudinal' for creating edges which simulate time series
     plots

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

     cc<-cor(t(swiss),use="p", method="s") 
     ccd<-sqrt(2*(1-cc)) 
     a <- which(lower.tri(ccd), arr.ind=TRUE)
     src <- row.names(swiss)[a[,2]]
     dest <- row.names(swiss)[a[,1]] 
     weight <- as.vector(as.dist(ccd))
     gg <- ggobi(swiss)
     gg$cor <- data.frame(weight)
     edges(gg$cor) <- cbind(src, dest)
     edges(gg$cor)
     edges(gg$cor) <- NULL

