xgvis(xgobi)
xgvis()所属R语言包:xgobi
XGvis: Interactive Multidimensional Scaling Using XGobi for Display
XGvis:使用XGobi显示交互式多维标度
译者:生物统计家园网 机器人LoveR
描述----------Description----------
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.
R接口XGvis,互动多维尺度(MDS)的程序,包括一个控制面板来操作的MDS应力函数的参数和一个xgobi窗口的数据显示。它可以使用,也可以用于可视化的相异数据,降维,或图形布局。通常是在2D图形布局,但xgvis允许在任意尺寸的布局中,3D是默认的。它允许缺失值,它可以被用来实现多维展开。
用法----------Usage----------
xgvis(dmat = NULL,
edges= NULL,
pos = NULL,
rowlab = colnames(dmat),
colors = NULL, glyphs = NULL,
erase = NULL, lines = NULL, linecolors = NULL,
resources = NULL, display = NULL,
multi = TRUE,
keep = FALSE, fprefix = "xgvis-")
参数----------Arguments----------
参数:dmat
numeric n * n distance matrix.
数字n * n的距离矩阵。
参数: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.
n * 2或n * 3矩阵的规格为图案的线段连接点对。必须至少包含两个数字,每行。前两个数字代表,应连接的两个点的行号。 (这是完全一样的lines的xgobi参数的结构)。此外,如果第三个数字是存在的,它是一个边的权重。
If edges is specified and dmat not, then the distance matrix is computed from edges, with each edge representing a distance of one.
如果edges指定dmat没有,那么距离矩阵计算从edges,用代表每个边缘的距离在一。
参数:pos
Starting positions: an n * p matrix. If pos is specified and dmat not, the distance matrix is computed from pos.
起始位置:n * p矩阵。如果pos指定dmat不,距离矩阵计算从pos。
参数:rowlab
character vector of n row labels (defaulting to those of dmat); if no default exists, xgobi constructs its own (numbers 1:n).
字符向量n的行标签(默认为那些dmat);如果没有默认存在,xgobi构建自己的(数字1:n)。
参数:colors
optional character vector supplying initial point colors to be used; see xgobi.
提供初始点使用的颜色可选字符向量; xgobi。
参数:glyphs
integer vector, used to supply glyphs to be used on startup, see xgobi.
整数向量,用来提供在启动时要使用的字形,请参阅xgobi。
参数:erase
Optional integer vector of length equal to the number of rows in the data and composed of 1s and 0s. A 1 in position i specifies that point i should be erased. The default is a vector of 0s.
可选整数向量的长度等于在数据中的行数和组成的1s和0s。 A 1的位置,我指定我应该被删除。默认值是0的向量。
参数:lines
Optional integer matrix, n by 2, which specifies by row number pairs of points to be connected by line segments. If lines are specified, then the edges is used to create the distance matrix but lines is used to draw the edges.
可选整数矩阵中,n 2,用于指定要通过线段连接的点的行数对。如果lines中指定,那么edges使用创建的距离矩阵,但lines是用来绘制的边缘。
参数:linecolors
Optional integer vector, of length n where n is the number of lines specified by the lines argument. It is used to supply line colors to be used on startup; the default is for all the lines to be drawn in the standard foreground color.
可选的整数向量,长度为n,其中n是lines参数指定的行数。它是用来提供在启动时使用的线的颜色;缺省是为所有的行要被绘制在标准的前景色。
参数:resources
Optional character vector created by clicking on the “Save Resources” button in XGobi.
点击“保存”按钮在XGobi创建可选的字符向量。
参数:display
Optional character string, identifying the monitor on which to display the xgvis window. The default is "machine:0.0" where machine is the name of the user's workstation. See documentation for X.
可选的字符串,确定显示器显示xgvis窗口。默认值是"machine:0.0"machine是在用户的工作站的名称。请参阅文档为X。
参数:multi
logical, indicating if the xgobi process should be run multi-tasking with R. If true, control returns to the R command prompt after 3 seconds.
逻辑,,,如果xgobi过程应执行多任务与R.如果为true,控制返回到R命令提示符下3秒后。
参数:keep
logical, indicating if the temporary files should be kept (e.g. for calling the xgobi program outside R)
逻辑,如果应保存的临时文件(例如调用xgobi计划海外研究)
参数:fprefix
character string for the file name prefix to be used for temporary files.
字符串的文件名前缀,用于临时文件的。
值----------Value----------
The UNIX status upon completion, i.e. 0 if ok.
在UNIX status完成后,即0,如果ok了。
副作用----------Side Effects----------
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.
的xgvis R函数执行调用的C程序相同的名称,并返回给用户控制的R命令行。
联系我们----------CONTACT----------
D. F. Swayne dfs@research.att.com
D. F.斯韦恩dfs@research.att.com
(作者)----------Author(s)----------
of <font face="Courier New,Courier" color="#666666"><b>R</b></font> port: Kurt Hornik and
Martin Maechler <a href="mailto:maechler@stat.math.ethz.ch">maechler@stat.math.ethz.ch</a>
参考文献----------References----------
http://www.research.att.com/areas/stat/xgobi/, <br> http://www.public.iastate.edu/~dicook/
参见----------See Also----------
xgobi.
xgobi。
实例----------Examples----------
data(morsecodes) ## from the XGobi/XGvis data, see ?morsecodes[#从XGobi / XGvis的数据,看?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.[#> 2)通过按“L”,用鼠标在图线。]
##> 3) Examine morsecode labels by hitting "i" and mousing around on the plot.[#> 3)通过点击“我”和鼠标移动的图检查morsecode标签。]
##> 3b) Press "r" (on the plot) to switch 3D rotation in xgobi.[#3B)按“R”(图)3D旋转切换xgobi。]
##> 4) Run MDS in 3D by clicking "Run MDS" (in xgvis).[#4)运行在3D MDS通过点击“运行MDS”(xgvis)的。]
##> 5) Speed up the optimization by increasing the "Stepsize" with the slider.[#5)加快优化与滑块增加了“步长”。]
##> The "Stress function" value may go as low as 0.1925 (MM).[#>“压力功能”的价值可能会低至0.1925(MM)。]
##> 6) When the optimization calms down, click "Run MDS" to toggle MDS off.[#> 6)优化平静下来时,单击“运行MDS”切换MDS。]
##> 7) Rotate the MDS configuration in 3D {by "r" with mouse over plot}.[#7)旋转的MDS配置与鼠标移到图,在3D {“R”。]
##> 8) Increase the rotation speed with the slider in the top left and[#> 8)增加的旋转速度与滑动件在其顶部左侧和]
##> control the rotation direction by dragging the mouse on the plot.[#>控制旋转方向上拖动鼠标的图。]
##> 9) You can check out the initial configuration by[#> 9),您可以检查出的初始配置]
## In order to have no color warning :[#为了有没有色警示:]
Mcolors <- unique(morsecodes.colors)
(Mcolors <- paste("*brushColor", 0length(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[#> XGobi窗口将与]
##> the XGvis window for glyph-color brushing and labeling.[#>的XGvis的窗口字形色刷牙和标签。]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|