[R] MDS in 3D

Atte Tenkanen attenka at utu.fi
Mon Jan 8 00:03:36 CET 2007


> Hi,
> 
> I have tried to develop multidimensional scaling for 3D space using 
> PCA without success, yet;-) Is there some application ready in R?
> 
> Cheers,
> 
> Atte
> 

I found xgobi, but when I try to run example I get some command not found -errors.

Atte


> 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)
xgvis /tmp/RtmpDaR3cT/xgvis-6058ed8 & 
> 
> ##>   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)
/bin/sh: line 1: xgvis: command not found
> (Mcolors <- paste("*brushColor", 0:(length(Mcolors)-1),": ", Mcolors, sep=""))
[1] "*brushColor0: SkyBlue" "*brushColor1: Green"  
[3] "*brushColor2: Yellow"  "*brushColor3: HotPink"
[5] "*brushColor4: Red"    
> 
> 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))
xgobi -title 'morsecodes.pos' -std mmx /tmp/RtmpDaR3cT/xgobi-mrscd56e509fe & 
/bin/sh: line 1: xgobi: command not found
> 
> ##>      This XGobi window will be linked with
> ##>      the XGvis window for glyph-color brushing and labeling.



More information about the R-help mailing list