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

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

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

                                        Test if Two 'spam' Objects are (Nearly) Equal
                                         测试如果两个“垃圾邮件”的对象是(几乎)等于

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

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

Utility to compare two spam objects testing 'near equality'.  Depending on the type of difference, comparison is still made to some extent, and a report of the differences is
实用程序来比较两个spam对象测试的近平等“。根据型的区别,比较仍然在一定程度上的差异的报告是


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



## S3 method for class 'spam'
all.equal(target, current, tolerance = .Machine$double.eps^0.5,
    scale = NULL, check.attributes = FALSE,...)



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

参数:target
a spam object.
一个spam对象。


参数:current
another spam object to be compared with target.
另一个spam对象进行比较的target。


参数:tolerance
numeric >= 0.  Differences smaller than tolerance are not considered.
数值> = 0。差异小于tolerance都没有考虑。


参数:scale
numeric scalar > 0 (or NULL). See "Details".
数字标量> 0(或NULL“)。请参阅“详细信息”。


参数:check.attributes
currently not yet implemented.
目前尚未实现。


参数:...
Further arguments for different methods.
进一步的论据不同的方法。


Details

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

Numerical comparisons for scale = NULL (the default) are done by first computing the mean absolute difference of the two numerical vectors.  If this is smaller than tolerance or not finite, absolute differences are used, otherwise relative differences scaled by the mean absolute difference.
scale = NULL(默认值)的数值比较,首先计算平均绝对差的,这两个数字向量。如果这是小于tolerance或不是有限的,绝对差的使用,另有缩放的平均绝对差的相对差异。

If scale is positive, absolute comparisons are made after scaling (dividing) by scale.
scale如果是积极的,绝对的比较缩放后的scale(分割)。

Do not use all.equal.spam directly in if expressions: either use isTRUE( all.equal.spam(...)) or identical if appropriate.
不要使用all.equal.spam直接在if表达式:要么使用isTRUE( all.equal.spam(...))或identical(如适用)。

Cholesky decomposition routines use this function to test for symmetry.
Cholesky分解程序使用此功能来测试对称。

A method for matrix-spam objects is defined as well.
matrix-spam对象的方法也被定义。

There is the additional catch of a zero matrix being represented by one zero element, see "Examples" below.
有额外的捕捞产量零矩阵被表示为一个零元素,请参阅下面的范例。


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

Either TRUE or a vector of 'mode' "character" describing the differences between target and current.
是TRUE或模式的向量"character"描述target和current之间的差异。


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


Reinhard Furrer



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

isSymmetric.spam and cleanup.
isSymmetric.spam和cleanup。


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


obj <- diag.spam(2)
obj[1,2] <- .Machine$double.eps

all.equal( diag.spam(2), obj)

all.equal( t(obj), obj)

all.equal( t(obj), obj*1.1)

# We can compare a spam to a matrix[我们可以比较一下垃圾邮件矩阵]
all.equal(diag(2),diag.spam(2))

# the opposite does often not make sense,[相反并常常没有什么意义,]
# hence, it is not implemented.[因此,它被未实现。]
all.equal(diag.spam(2),diag(2))


# A zero matrix contains one element:[一个零矩阵包含一个元素:]
str(spam(0))
# hence[故]
all.equal.spam(spam(0,3,3), diag.spam(0,3) )
norm(spam(0,3,3) - diag.spam(0,3) )

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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