找回密码
 注册
查看: 592|回复: 0

R语言 sendplot包 heatmap.send()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 00:50:11 | 显示全部楼层 |阅读模式
heatmap.send(sendplot)
heatmap.send()所属R语言包:sendplot

                                        INTERACTIVE HEATMAP
                                         互动热图

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function is a wrapper for the R stats package heatmap. This will create an interactive heatmap image. NOTE: The majority of the code for this function is verbatim from the R package stats heatmap function. This function was designed to work as a wrapper to untilize the same functionality and plotting as the heatmap function with sendplot's interactive functionality.
这个函数是一个包装的R统计包热图。这将创建一个互动热图图像。注意:此功能的代码,大部分是逐字从R stats包的热图功能。此功能的目的是要作为一个,包装到untilize HeatMap在功能与sendplot的互动功能相同的功能和绘图工作。


用法----------Usage----------


heatmap.send(x,Rowv = NULL,
             Colv = if (symm) "Rowv" else NULL,
             distfun = dist,hclustfun = hclust,
             reorderfun = function(d,w) reorder(d, w),
             add.expr,symm = FALSE,
             revC = identical(Colv,"Rowv"),
             scale = c("row", "column", "none"),
             na.rm = TRUE, margins = c(5, 5),
             ColSideColors,RowSideColors,
             MainColor = heat.colors(12),
             cexRow = 0.2 +  1/log10(nr),
             cexCol = 0.2 + 1/log10(nc),
             labRow = NULL,labCol = NULL,
             main = NULL,xlab = NULL,ylab = NULL,
             keep.dendro = FALSE,
             verbose = getOption("verbose"),
            
             x.labels=NA,y.labels=NA,xy.labels=NA,
             x.links=NA, y.links=NA,
             xy.links=NA,asLinks=NA,
             x.images=NA, y.images=NA,
             xy.images=NA,
             spot.radius=5,source.plot=NA,
             image.size="800x1100",
             fname.root="test",dir="./", header="v3",
             window.size = "800x1100",
             ...)




参数----------Arguments----------

参数:x
numeric matrix of the values to be plotted
数值矩阵的值被绘制


参数:Rowv
determines if and how the row dendrogram should be computed and reordered.  Either a 'dendrogram' or a vector of values used to reorder the row dendrogram or 'NA' to suppress any row dendrogram (and reordering) or by default, 'NULL', see heatmap argument
决定是否以及如何计算和重新排序的行聚类分析。无论是“树状图”或重新排序的行树状图或“不适用”禁止任何行聚类分析和重新排序或默认值的向量,NULL,看到热图参数


参数:Colv
determines if and how the column dendrogram should be reordered.  Has the same options as the 'Rowv' argument above and additionally when 'x' is a square matrix, 'Colv = "Rowv"' means that columns should be treated identically to the rows
决定是否以及如何应重新排序列树状图。作为“Rowv”上述论点,另外,当x是一个方阵,具有相同的选项,“Colv =”Rowv“的”是指应该被视为同列的行


参数:distfun
function used to compute the distance (dissimilarity) between both rows and columns.  Defaults to 'dist'
函数,用于计算两个行和列之间的距离(相异)。默认设置为“区”


参数:hclustfun
function used to compute the hierarchical clustering when 'Rowv' or 'Colv' are not dendrograms.  Defaults to 'hclust'
函数,用于计算当Rowv或Colv不是聚类层次聚类。默认为“hclust的”


参数:reorderfun
function(d,w) of dendrogram and weights for reordering the row and column dendrograms.  The default uses 'reorder.dendrogram'
函数(d,w)的重新排序的行和列的聚类的聚类分析和重量。默认使用“reorder.dendrogram”


参数:add.expr
expression that will be evaluated after the call to 'image'.  Can be used to add components to the plot
表达式,该表达式将被评估后调用“形象”。可用于将组件添加到图


参数:symm
logical indicating if 'x' should be treated *symm*etrically; can only be true when 'x' is a square matrix.
逻辑指示应被视为如果x* SYMM * etrically;只能是真时,“x”是一个方阵。


参数:revC
logical indicating if the column order should be 'rev'ersed for plotting, such that e.g., for the symmetric case, the symmetry axis is as usual
逻辑表示如果列的顺序应该是reversed的图,例如,为对称的情况下,对称轴是像往常一样


参数:scale
character indicating if the values should be centered and scaled in either the row direction or the column direction, or none.  The default is '"row"' if 'symm' false, and '"none"' otherwise
字符,指示如果值应为中心和缩放的行方向或列方向上,或根本没有。默认为“”行“”如果“SYMM假的,”无“”,否则


参数:na.rm
logical indicating whether 'NA”s should be removed
逻辑“NA”是否应该被删除


参数:margins
numeric vector of length 2 containing the margins (see 'par(mar= *)') for column and row names, respectively
数字矢量长度为2的边缘(见“面值(3月= *))的列名和列名,分别


参数:ColSideColors
(optional) character vector of length 'ncol(x)' containing the color names for a horizontal side bar that may be used to annotate the columns of 'x'
(可选)字符的矢量长度“NCOL(x)的包含可用于注释的列的x的水平边栏的颜色名称


参数:RowSideColors
(optional) character vector of length 'nrow(x)' containing the color names for a vertical side bar that may be used to annotate the rows of 'x'
(可选)字符的矢量(x)的,可以用于标注的x的行的垂直边栏包含的颜色名称的长度“NROW


参数:MainColor
color scale for values. Passed into 'image' function as col argument
色标值。山坳参数传递到“图像”功能


参数:cexRow
positive number, used as 'cex.axis' in for the row axis labeling. The defaults currently only use number of rows
正数,,作为“cex.axis为行轴标签。目前默认使用的行数


参数:cexCol
positive number, used as 'cex.axis' in for the column axis labeling. The defaults currently only use number of columns
正数,,用作cex.axis中的列的坐标轴标签。默认目前使用的列数


参数:labRow
character vectors with row labels to use; these default to 'rownames(x)'
特征向量与行标签使用这些默认的“行名(X)”


参数:labCol
character vectors with column labels to use; these default to 'colnames(x)'
特征向量与列标签,使用这些默认为“列名(X)”


参数:main
main title; defaults to none
主标题,默认为none


参数:xlab
x axis title; defaults to none
X轴标题,默认为none


参数:ylab
y axis title; defautls to none
Y轴标题; defautls无法比拟的


参数:keep.dendro
logical indicating if the dendrogram(s) should be kept as part of the result (when 'Rowv' and/or 'Colv' are not NA)
逻辑表明,如果树状图(S)应尽可能结果的一部分(当Rowv“和/或”Colv“不NA)


参数:verbose
logical indicating if information should be printed
逻辑表示,如果信息应印


参数:x.labels
data frame of n x m which contains values relating to the x axis of the heatmap plot. n should be equal to the second dimension of the x argument.This information is displayed in the interactive plot window. This may be left as NA.
NXM其中包含有关的热图图的x轴的值的数据框。 n应该是平等的第二个方面的x argument.This信息显示在交互式绘图窗口中的。这可能被留为NA。


参数:y.labels
data frame of n x m which contains values relating to the y axis of the heatmap plot. n should be equal to the first dimension of the x argument.This information is displayed in the interactive plot window. This may be left as NA  
NXM其中包含有关的热图图的y轴的值的数据框。 n应该是相等的第一个维度的x argument.This信息显示在交互式绘图窗口中的。为NA,这可能会留下


参数:xy.labels
list of matricies. All matricies should be of n x m where n is equal to the first dimension of the x argument and m is equal to the second dimension of the x argument. This information is displayed in the interactive plot window. This may be left NA
列表的matricies。所有matricies应该是NXM其中n是等于的第一维中的参数x和m是等于引数x的第二维。此信息显示在交互式绘图窗口。这可能会留下不适用


参数:x.links
data frame of n x m which contains web addresses for links relating to the x axis of the heatmap plot. n should be equal to the second dimension of the x argument. m columns contains information regarding sample. This information is displayed as hyperlinks in the interactive plot window. This may be left NA
数据框NXM,其中包含网络地址关于HeatMap在图的x轴的链接。 n应该是等于参数x的第二维。 m列包含有关样品的信息。此信息显示作为交互式绘图窗口中的超链接。这可能会留下不适用


参数:y.links
data frame of n x m which contains web addresses for links relating to the y axis of the heatmap plot. n should be equal to the first dimension of the x argument. This information is displayed as hyperlinks in the interactive plot window. This may be left as NA
,的NXM其中包含链接的网页地址为y轴的热图图的数据框。 n应该等于X的参数的第一个维度。此信息显示作为交互式绘图窗口中的超链接。为NA,这可能会留下


参数:xy.links
list of matricies.  All matricies should be of n x m where n is equal to the first dimension of the x argument and m is equal to the second dimension of the x argument. This information is displayed in the interactive plot window as hyperlinks. The values in these matricies should be complete web address
列表的matricies。所有matricies应该是NXM其中n是等于的第一维中的参数x和m是等于引数x的第二维。为超链接的互动式绘图窗口中显示此信息。值在这些matricies应是完整的Web地址


参数:asLinks
contains complete web address for points that should be treated as hyperlinks. May be a data.frame or matrix of n x m  where n is equal to the first dimension of the x argument and m is equal to the second dimension of the x argument, a vector of length equal to the first dimension of the x argument that will be repeated, a vector of length equal to the second dimension of the x argument that will be repeated,a non NA value of length 1 that will be repeated for all points, or a vector of length dim(x)[1]*dim(x)[2]   
包含完整的网络地址应被视为超链接点。可能是一个数据框或矩阵NXM其中n是等于的第一维中的参数x和m是等于X的参数的第二维数,引数x的第一维中,将一个向量的长度等于被重复,一个向量的长度等于第二维的X的参数将被重复,非NA值的长度为1,将重复的所有点,或一个矢量长度暗淡(x)的[1] *暗淡(x)的[2]


参数:x.images
data frame of n x m which contains paths for images relating to the x axis of the heatmap plot. n should be equal to the second dimension of the x argument. m columns contains information regarding sample. This information is displayed as images in the interactive plot window. This may be left NA
的NXM其中包含的路径有关的图像的x轴的热图图的数据框。 n应该是等于参数x的第二维。 m列包含有关样品的信息。此信息显示作为交互式绘图窗口中的图像。这可能会留下不适用


参数:y.images
data frame of n x m which contains paths for images relating to the y axis of the heatmap plot. n should be equal to the first dimension of the x argument. This information is displayed as images in the interactive plot window. This may be left as NA
的NXM其中包含有关于y轴的热图图的图像的路径的数据框。 n应该等于X的参数的第一个维度。此信息显示作为交互式绘图窗口中的图像。为NA,这可能会留下


参数:xy.images
list of matricies.  All matricies should be of n x m where n is equal to the first dimension of the x argument and m is equal to the second dimension of the x argument. This information is displayed in the interactive plot window as images. The values in these matricies should be complete path of images
列表的matricies。所有matricies应该是NXM其中n是等于的第一维中的参数x和m是等于引数x的第二维。此信息将显示在图像的互动式绘图窗口。值在这些matricies应的图像的完整路径


参数:spot.radius
radius of circle in pixels indicating area that will be interactive around the center of graphed points
圆的半径,在指示区域的像素,将绘制的点的中心周围是交互式


参数:source.plot
Indicates whether application should make a postscript file and then convert to png file, or if the png file should be made directly. This value is either ps, png, or NA. If NA the operating system is checked and the appropraite file format is output. Unix has a convert function that can convert a ps file to png file; we by default use this setup because we feel the postscript file maintains better quality. So on unix/linux systems if source.plot is NA, source.plot will be set to ps. Windows does not have this option, for this reason source.plot will be set to png if left NA
指示应用程序是否应该让一个postscript文件,然后转换成PNG文件,或png文件应直接。这个值可以是PS,PNG或NA。如果NA的操作系统被选中并且建立适合的文件格式是输出。 Unix系统有一个转换功能,可以将一个PS文件转换为png文件,默认情况下,使用这种设置,因为我们觉得postscript文件保持更好的质量。因此,在UNIX / Linux系统如果source.plot是NA,source.plot将被设置为PS。 Windows并没有这个选项,因为这个原因source.plot将被设置为PNG,如果不适用


参数:image.size
character indicating size of device.
字符指示的移动设备的大小。


参数:fname.root
Base name to use for all files created.
基本名称使用的所有文件创建。


参数:dir
directory path to where files should be created. Default creates files in working directory
应建立文件的目录路径。默认创建的文件在工作目录


参数:header
May either be v1,v2, or v3. This determines which tooltip header will be in the html file. Each version has different features or works well with different web browsers. see sp.header for details.
可能是V1,V2或V3。这决定了哪些工具提示头将在HTML文件中。每个版本都有不同的特点,或与不同的Web浏览器。有关详细信息,请参阅sp.header。


参数:window.size
size of the html window. Only effective when header=v3
html窗口的大小。只有有效的头= V3


参数:...
additional arguments to the makeImap function
其他参数的makeImap功能的


Details

详细信息----------Details----------

The majority of the code for this function is verbatim from the R package stats heatmap function. This function was designed to work as a wrapper to untilize the same functionality and plotting as the heatmap function with sendplot's interactive functionality. See heatmap for more details on arguments and details concerning the creatation of plots.
该函数的代码的大部分是逐字从R stats包的热图功能。此功能的目的是要作为一个,包装到untilize HeatMap在功能与sendplot的互动功能相同的功能和绘图工作。见heatmap的详细信息,参数和细节图的creatation。

See sendplot for more information regarding the creation of the interactive output with tool-tip content.
见sendplot创造的互动工具提示的内容输出方面的更多信息。

Users are encouraged to read the package vignette which includes a detailed discussion of all function arguments as well as several useful examples.
我们鼓励用户阅读的的包小插曲,其中包括详细讨论了函数的所有参数以及一些有用的例子。


值----------Value----------

creates the static and interactive versions of heatmap
创建静态和交互式版本的热图


注意----------Note----------

The majority of the code for this function is verbatim from the R package stats heatmap function. This function was designed to work as a wrapper to untilize the same functionality and plotting as the heatmap function with sendplot's interactive functionality.
该函数的代码的大部分是逐字从R stats包的热图功能。此功能的目的是要作为一个,包装到untilize HeatMap在功能与sendplot的互动功能相同的功能和绘图工作。

The interactive html plot currently only works in web browsers that implement java script.
交互的HTML图目前只适用于在实现Java脚本的Web浏览器。

The code used to create the javascript embedded in html file is a modified version of the javascript code or from the open source tooltip library. see reference links
用于创建JavaScript嵌入在HTML文件中的代码是修改后的版本的JavaScript代码的开源工具提示库。见参考文献链接


(作者)----------Author(s)----------



Lori A. Shepherd and Daniel P. Gaile;

Authors of heatmap code used in our code: Andy Liaw, original; R. Gentleman, M. Maechler, W. Huber,revisions



参考文献----------References----------





参见----------See Also----------

initSplot,makeImap,makeSplot,imagesend,heatmap.send.legacy, sendplot, heatmap
initSplot,makeImap,makeSplot,imagesend,heatmap.send.legacy,sendplot,heatmap


实例----------Examples----------



library(sendplot)
library(rtiff)

require(graphics)


x  = as.matrix(mtcars)
rc = rainbow(nrow(x), start=0, end=.3)
cc = rainbow(ncol(x), start=0, end=.3)

xy.labels=list(value=x)


x.labels=data.frame(label=colnames(x),
  description=c("Miles/(US) gallon","Number of cylinders",
    "Displacement (cu.in.)",
    "Gross horsepower",
    "Rear axle ratio",
    "Weight (lb/1000)",
    "1/4 mile time",
    "V/S",
    "Transmission (0 = automatic, 1 = manual)",
    "Number of forward gears",
    "Number of carburetors")
  )


#set up temporary directory[设立临时目录]
direct = paste(tempdir(),"/",sep="")
direct


heatmap.send(x,scale="column", xy.labels = xy.labels,
                 x.labels=x.labels,
                 RowSideColors = rc, ColSideColors = cc, margin=c(5,10),
                 xlab = "specification variables", ylab= "Car Models",
                 main = "mtcars data",
                 fname.root="exHeat",dir=direct,
                 font.size=18,image.size="600x900")




转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-19 07:08 , Processed in 0.023387 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表