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

R语言 spam包 image()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:21:23 | 显示全部楼层 |阅读模式
image(spam)
image()所属R语言包:spam

                                        Display a spam Object as Color Image
                                         作为彩色图像显示垃圾邮件的对象

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

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

The function creates a grid of colored rectangles with
该函数创建一个不同颜色的矩形网格


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


image(x, ...)



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

参数:x
matrix of class spam or spam.chol.NgPeyton.
矩阵类spam或spam.chol.NgPeyton。


参数:...
any other arguments passed to image.default and plot.
任何其他参数传递给image.default和plot。


Details

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

getOption("imagesize") determines  if the sparse matrix is coerced into a matrix and the plotted similarly to image.default or if the matrix is simply represented as a scatterplot with pch=".". The points are scaled according to cex*spam.getOption("cex")/(nrow+ncol). For some devices or for non-square matrices, cex needs probably some adjustment.<br> The a zero matrix in spam format has as (1,1) entry the value zero and only missing entries are interpreted as NA in the scatter plot.
getOption("imagesize")决定,如果被强制转换成一个矩阵的稀疏矩阵和绘制的类似image.default如果矩阵是简单地表示的散点图与pch="."。点缩放根据cex*spam.getOption("cex")/(nrow+ncol)。对于一些设备,或者用于非方阵,cex需要可能进行一些调整。参考零矩阵spam格式为(1,1)项的值为零,唯一缺少的条目解释为NA在散点图中。


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


Reinhard Furrer



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

display and  spam.options.<br> The code is based on  image of graphics.
display和spam.options。<BR>代码的基础上imagegraphics的。


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


set.seed(13)
nz <- 8
ln <- nz
smat <- spam(0, ln, ln)
smat[ cbind(sample(ln,nz), sample(ln,nz))] <- 1:nz

par(mfcol=c(1,2),pty='s')
spam.options( imagesize=1000)
image(smat) # better: col=tim.colors(nz))[好:列= tim.colors(NZ))]
spam.options( imagesize=10)
image(smat) # better: col=tim.colors(nz))[好:列= tim.colors(NZ))]


nz <- 128
ln <- nz^2
smat <- spam(0,ln,ln)
smat[cbind(sample(ln,nz), sample(ln,nz))] <- 1:nz

par(mfcol=c(1,1), pty='s')
image(smat,cex=100) # better:, col=tim.colors(nz))[好:列= tim.colors(NZ))]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-9 18:23 , Processed in 0.024248 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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