r2gtr(ctc)
r2gtr()所属R语言包:ctc
Write to gtr, atr, cdt file format
写信给GTR,ATR,CDT的文件格式
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Write data frame and hclust object to gtr atr, cdt files (Xcluster or Cluster output). Visualisation of cluster can be
写GTR ATR,CDT文件(Xcluster或聚类输出)数据框和hclust对象。聚类可视化
用法----------Usage----------
r2gtr(hr,file="cluster.gtr",distance=hr$dist.method,dec='.',digits=5)
r2atr(hc,file="cluster.atr",distance=hc$dist.method,dec='.',digits=5)
r2cdt(hr,hc,data,labels=FALSE,description=FALSE,file="cluster.cdt",dec='.')
参数----------Arguments----------
参数:file
the path of the file
该文件的路径
参数:data
a matrix (or data frame) which provides the data to put into the file
矩阵(或数据框)提供的数据放到文件
参数:hr,hc
objects of class hclust (rows and columns)
类hclust对象(行和列)
参数:distance
The distance measure used. This must be one of ""euclidean"", ""maximum"", ""manhattan"", ""canberra"" or ""binary"". Any unambiguous substring can be given.
使用的距离度量。这必须是一个“”欧几里德“,”最大“,”曼哈顿“,”堪培拉“或”二进制“。可以给出任何明确的子串。
参数:digits
number digits for precision
精密数位
参数:labels
a logical value indicating whether we use the frist column as labels (NAME column for cluster file)
一个逻辑值,表明我们是否使用标签的第一列(聚类文件名称列)
参数:description
a logical value indicating whether we use the second column as description (DESCRIPTION column for cluster file)
一个逻辑值,指示是否使用(聚类文件说明列)作为第二列描述
参数:dec
the character used in the file for decimal points
在文件中使用的字符,小数点
Details
详情----------Details----------
Function hclust2treeview compute hierarchical
功能hclust2treeview计算分层
作者(S)----------Author(s)----------
Antoine Lucas, <a href="http://antoinelucas.free.fr/ctc">http://antoinelucas.free.fr/ctc</a>
参考文献----------References----------
for Huge Clustering, R News, 2006, vol 6, issue 5 pages 58-60.
参见----------See Also----------
r2xcluster, xcluster2r,hclust,hcluster
r2xcluster,xcluster2r,hclust,hcluster
举例----------Examples----------
# Create data[创建数据]
set.seed(1)
m <- matrix(rep(1,3*24),ncol=3)
m[9:16,3] <- 3 ; m[17:24,] <- 3 #create 3 groups[创建3组]
m <- m+rnorm(24*3,0,0.5) #add noise[添加噪声]
m <- floor(10*m)/10 #just one digits[只是一个数字]
# use library stats[使用图书馆统计]
# Cluster columns[聚类列]
hc <- hclust(dist(t(m)))
# Cluster rows[聚类行]
hr <- hclust(dist(m))
# Export files[导出文件]
r2atr(hc,file="cluster.atr")
r2gtr(hr,file="cluster.gtr")
r2cdt(hr,hc,m ,file="cluster.cdt")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|