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

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

[复制链接]
发表于 2012-2-26 00:33:51 | 显示全部楼层 |阅读模式
logAdd(mBPCR)
logAdd()所属R语言包:mBPCR

                                        Overflow-safe computation of the logarithm of a sum
                                         溢出安全计算对数的总和

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

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

Function to compute the logarithm of a sum of small numbers, avoiding overflow.
函数来计算一笔小数目的对数,避免溢出。


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


  logAdd(x)



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

参数:x
array or matrix containing the logarithm of the terms of the sum. If x is a matrix, the function return the results by column.
数组或矩阵包含对数的总和。 x如果是一个矩阵,函数返回列的结果。


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

If x is an array, the function returns log(sum_i(e^x[i])), otherwise it returns an array containing the results by column.
x如果是一个数组,函数返回log(sum_i(e^x[i])),否则返回一个数组,包含列的结果。


举例----------Examples----------


x <- log(c(0.0001, 0.0003, 0.000006))
y <- logAdd(x)
##verification that the computation is correct[#验证的计算是正确的]
z <- sum(c(0.0001, 0.0003, 0.000006))
z
exp(y)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-3 22:00 , Processed in 0.022230 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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