xgvis                 package:xgobi                 R Documentation

_X_G_v_i_s: _I_n_t_e_r_a_c_t_i_v_e _M_u_l_t_i_d_i_m_e_n_s_i_o_n_a_l _S_c_a_l_i_n_g _U_s_i_n_g _X_G_o_b_i _f_o_r _D_i_s_p_l_a_y

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

     R interface to `XGvis', an interactive multidimensional scaling
     (MDS) program that consists of a control panel to manipulate the
     parameters of the MDS stress function and an `xgobi' window for
     data display.  It can be used either for visualization of
     dissimilarity data, for dimension reduction, or for graph layout.
     Graph layout is usually done in 2D, but `xgvis' allows layouts in
     arbitrary dimensions, 3D being the default.  It permits missing
     values, which can be used to implement multidimensional unfolding.

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

     xgvis(dmat = NULL,
           edges= NULL,
           pos  = NULL,
           rowlab = dimnames(dmat)[[1]],
           colors = NULL, glyphs = NULL,
           erase = NULL, lines = NULL, linecolors = NULL,
           resources = NULL, display = NULL,
           keep = FALSE, fprefix = "xgvis-")
     )

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

    dmat: numeric n * n distance matrix.

   edges: n * 2 or n * 3 matrix of specifications for the pattern of
          line segments which connect pairs of points.  Must contain at
          least two numbers per line.  The first two numbers represent
          the row numbers of the two points that should be connected. 
          (This is exactly like the structure of a the `lines' argument
          of `xgobi'.)  In addition, if a third number is present, it
          is taken to be an edge weight.

          If `edges' is specified and `dmat' not, then the distance
          matrix is computed from `edges', with each edge representing
          a distance of one. 

     pos: Starting positions: an `n * p' matrix. If `pos' is specified
          and `dmat' not, the distance matrix is computed from `pos'.

  rowlab: character vector of `n' row labels (defaulting to those of
          `dmat'); if no default exists, `xgobi' constructs its own
          (numbers `1:n').

  colors: optional character vector supplying initial point colors to
          be used; see `xgobi'.

  glyphs: integer vector, used to supply glyphs to be used on startup,
          see `xgobi'.

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

     The UNIX `status' upon completion, i.e. `0' if ok.

_S_i_d_e _E_f_f_e_c_t_s:

     The xgvis R function executes a call to the C program of the same
     name, and returns control of the R command line to the user.

_C_O_N_T_A_C_T:

     D. F. Swayne dfs@research.att.com

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

     of R port: Kurt Hornik and Martin Maechler
     maechler@stat.math.ethz.ch

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

     <URL: http://www.research.att.com/areas/stat/xgobi/>, 
     <URL: http://www.public.iastate.edu/~dicook/>

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

     `xgobi'.

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

     data(morsecodes) ## from the XGobi/XGvis data, see  ?morsecodes
     mc.row <- paste(morsecodes.row[,1],morsecodes.row[,2])

     xgvis(dmat = morsecodes.dist,
           pos = morsecodes.pos,
           rowlab = mc.row,
           colors = morsecodes.colors,
           glyphs = morsecodes.glyphs,
           lines = morsecodes.lines,
           linecolors = morsecodes.linecolors)

     ##>   2) Show lines by hitting "l" with the mouse over the plot.
     ##>   3) Examine morsecode labels by hitting "i" and mousing around on the plot.
     ##>   3b) Press "r" (on the plot) to switch 3D rotation in xgobi.
     ##>   4) Run MDS in 3D by clicking "Run MDS" (in xgvis).
     ##>   5) Speed up the optimization by increasing the "Stepsize" with the slider.
     ##>      The "Stress function" value may go as low as 0.1925 (MM).
     ##>   6) When the optimization calms down, click "Run MDS" to toggle MDS off.
     ##>   7) Rotate the MDS configuration in 3D {by "r" with mouse over plot}.
     ##>   8) Increase the rotation speed with the slider in the top left and
     ##>      control the rotation direction by dragging the mouse on the plot.
     ##>   9) You can check out the initial configuration by

     ## In order to have no color warning :
     Mcolors <- unique(morsecodes.colors)
     (Mcolors <- paste("*brushColor", 0:(length(Mcolors)-1),": ", Mcolors, sep=""))

     xgobi(morsecodes.pos, collab = morsecodes.col, rowlab = mc.row,
           colors = morsecodes.colors,
           glyphs = morsecodes.glyphs,
           lines  = morsecodes.lines,
           linecolors = morsecodes.linecolors,
           resources= c("*showLines: True", Mcolors))

     ##>      This XGobi window will be linked with
     ##>      the XGvis window for glyph-color brushing and labeling.

