"edges<-"               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<-"(x, value)

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

       x: ggobiDataset

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

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

     To remove edges, set edges to NULL.

     @arguments ggobiDataset @arguments matrix or data frame of edges. 
     First column should be from edge, second column to edge. @keyword
     manip

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

     Hadley Wickham <h.wickham@gmail.com>

_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

