cparcoord               package:gclus               R Documentation

_E_n_h_a_n_c_e_d _p_a_r_a_l_l_e_l _c_o_o_r_d_i_n_a_t_e _p_l_o_t

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

     This function draws a parallel coordinate plot of data. Variables
     may be reordered and panels colored in the display. It is a
     modified version of 'parcoord {MASS}'.

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

     cparcoord(data, order = NULL, panel.colors = NULL, col = 1, lty = 1, horizontal = FALSE, mar = NULL, ...)

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

    data: a numeric matrix 

   order: the order of variables. Default is the order in data.

panel.colors: either a vector or a matrix of panel colors. If a  vector
          is supplied, the ith color is used for the ith panel. If a
          matrix, dimensions  should match those of the variables.
          Diagonal entries are ignored. 

     col: a vector of colours, recycled as necessary for each
          observation.  

     lty: a vector of line types,  recycled as necessary for each
          observation.  

horizontal: If TRUE, orientation is horizontal. 

     mar: margin parameters, passed to 'par'. 

     ...: graphics parameters which are passed to matplot.

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

     If 'panel.colors' is a matrix and 'order' is supplied,
     'panel.colors' is  reordered.

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

     Catherine B. Hurley

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

     Hurley, Catherine B.  "Clustering Visualisations of
     Multidimensional  Data", Journal of Computational and Graphical
     Statistics, vol. 13, (4), pp 788-806, 2004.

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

     'cpairs', 'parcoord', 'dmat.color', 'colpairs', 'order.endlink'.

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

     data(state)
     state.m <- colpairs(state.x77, 
     function(x,y)  cor.test(x,y,"two.sided","kendall")$estimate, diag=1)
     # OR, Works only in R1.8,  state.m <-cor(state.x77,method="kendall")  

     state.col <- dmat.color(state.m)

     cparcoord(state.x77, panel.color= state.col)
     # Get rid of the panels with lots of line crossings (yellow) by reordering:
     cparcoord(state.x77, order.endlink(state.m), state.col)

     # To get rid of the panels with lots of long line segments:
     #  use a different panel merit measure- pclen:

     mins <- apply(state.x77,2,min)
     ranges <- apply(state.x77,2,max) - mins
     state.m <- -colpairs(scale(state.x77,mins,ranges), pclen)
     cparcoord(state.x77, order.endlink(state.m), dmat.color(state.m))

