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

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

[复制链接]
发表于 2012-9-30 09:35:07 | 显示全部楼层 |阅读模式
simSummary(simSummary)
simSummary()所属R语言包:simSummary

                                        Simulation summary
                                         模拟摘要

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

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

simSummary eases the process of summarizing simulation results. Simulations often produce some intermediate results (some focal statistic(s)), that need to be summarized over many simulation replicates. simSummary
simSummary例总结仿真结果的过程。模拟经常会产生一些中间结果(一些重点统计(S)),需要总结过许多仿真复制。 simSummary


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


simSummary(x,
FUN = c("length",
"nobs",
"mean",
"sd",
"min",
"max"),
...)



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

参数:x
an (outer) list of (inner) lists, where each inner list has exactly the same structure (see examples)
(外)列表(内)列表,其中每个内部列表具有完全相同的结构(参见示例)


参数:FUN
character, summary statistics function names
字符,统计汇总函数名


参数:...
arguments passed to summary functions
汇总函数的参数传递给


Details

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

simSummary accepts as input an (outer) list of (inner) lists, where all inner lists must have the same structure and only scalars, vectors, matrices, and arrays can be used in inner lists. Function combines all inputs in a list of arrays and summarizes array values with specified functions that
simSummary接受作为输入的(外)(内层)的列表,列表内的所有列表必须具有相同的结构,唯一的标量,向量,矩阵,和阵列可以用于内列表。函数将一个数组列表中的所有输入和总结了数组的值指定的函数,


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

The return element is also a list (outer) of lists (inner), where each inner list has the same structure as inner lists of input, but holding
返回元素也是一个列表(外)的列表(内),其中每个内部列表作为输入的内部列表中具有相同的结构,但


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


Gregor Gorjanc



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



## Create simple input from a rather silly simulation[#创建一个简单的输入一个相当愚蠢的模拟]
simFun <- function(x)
{
  ret <- list()
  ret$s <- rnorm(n=1)
  ret$v <- rnorm(n=5)
  ret$m <- matrix(rnorm(n=5*5), nrow=5, ncol=5)
  ret$a <- array(rnorm(n=4*3*2), dim=c(4, 3, 2))
  ret
}
sim <- list()
sim$sim1 <- simFun()
sim$sim2 <- simFun(x=0)
sim$sim3 <- simFun(x=1)

## Simulation summary (just mean and standard deviation)[#仿真摘要(只是平均值和标准偏差)]
simSummary(x=sim, FUN=c("mean", "sd"))

## Can handle simulations in process too = handle NA values[#可以处理模拟过程中手柄NA值]
sim$sim3$s <- NA
sim$sim3$v[5] <- NA
simSummary(x=sim, FUN="mean")
simSummary(x=sim, FUN="mean", na.rm=TRUE)

## Unit tests (automatic run elsewhere)[#单元测试(自动运行别处)]
## summary(runTest(test(simSummary)))[#摘要(runTest的(测试(simSummary)))]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-25 10:53 , Processed in 0.020483 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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