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

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

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

                                        Dimensions of an Object
                                         一个对象的尺寸

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

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

Retrieve or set the dimension of an spam object.
检索或设置的spam对象的尺寸。


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


# dim(x)
# dim(x) <- value




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

参数:x
a spam matrix
一个spam矩阵


参数:value
A numeric two-vector, which is coerced to integer (by truncation).
一个数字的两个向量,它被强制转换为整数(截断)。


Details

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

It is important to notice the different behavior of the replacement method for ordinary arrays and spam objects (see "Examples"). Here, the elements are not simply rearranged but an entirely new matrix is constructed. If the new column dimension is smaller than the original, the matrix is also cleaned (with spam.option("eps") as filter).
重要的是要注意为普通数组和spam对象(见范例)的更换方法的不同行为。这里,元素不是简单地重新排列,但一个完全新的矩阵构成。如果新列的尺寸比原来的小,矩阵也清洗(spam.option("eps")过滤器)。

For the same operation as with regular arrays, use spam
与常规数组进行同样的操作,使用spam


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

dim retrieves the dimension slot of the object.  It is a vector of mode integer.
dim检索dimension插槽的对象。它是一个向量模式integer。

The replacemnt method changes the dimension of the object by truncation or extension (with zeros).
replacemnt方法改变削截或扩展的对象(零)的维数。


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


Reinhard Furrer



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

dim.
dim。


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


x <- diag(4)
dim(x)<-c(2,8)
x

s <- diag.spam(4)
dim(s) &lt;- c(7,3)  # any positive value can be used[可以使用任何正值]

s <- diag.spam(4)
dim(s) &lt;- c(2,8)  # result is different than x[比x的结果是不同的]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 03:30 , Processed in 0.033428 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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