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

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

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

                                        Cluster-Level SNOW Functions
                                         聚类级SNOW功能

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

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

Functions for computing on a SNOW cluster.
功能为计算在SNOW聚类。


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


clusterSplit(cl, seq)
clusterCall(cl, fun, ...)
clusterApply(cl, x, fun, ...)
clusterApplyLB(cl, x, fun, ...)
clusterEvalQ(cl, expr)
clusterExport(cl, list, envir = .GlobalEnv)
clusterMap(cl, fun, ..., MoreArgs = NULL, RECYCLE = TRUE)



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

参数:cl
cluster object
聚类对象


参数:fun
function or character string naming a function
功能或字符串命名的函数


参数:expr
expression to evaluate
要计算的表达式


参数:seq
vector to split
矢量分裂


参数:list
character vector of variables to export
导出变量的字符向量。


参数:envir
environment from which t export variables
环境,从中吨出口变数


参数:x
array
排列


参数:...
additional arguments to pass to standard function
额外的参数传递给标准功能


参数:MoreArgs
additional argument for fun
额外的参数为fun


参数:RECYCLE
logical; if true shorter arguments are recycled
逻辑,如果真较短的参数被回收


Details

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

These are the basic functions for computing on a cluster.  All evaluations on the slave nodes are done using tryCatch. Currently an error is signaled on the master if any one of the nodes produces an error.  More sophisticated approaches will be considered in the future.
这是计算聚类上的基本功能。从节点的所有评估都做了使用tryCatch。目前,一个错误的信号上的主节点,如果任何一个产生一个错误。将被视为在未来更复杂的方法。

clusterCall calls a function fun with identical arguments  ... on each node in the cluster cl and returns a list of the results.
clusterCall调用一个函数fun具有相同的参数...聚类中的每个节点上cl和返回的结果列表。

clusterEvalQ evaluates a literal expression on each cluster node. It a cluster version of evalq, and is a convenience function defined in terms of clusterCall.
clusterEvalQ评估每个聚类节点上的文字表达。它在聚类版本的evalq,是一个方便的功能定义的clusterCall。

clusterApply calls fun on the first cluster node with arguments seq[[1]] and ..., on the second node with seq[[2]] and ..., and so on.  If the length of seq is greater than the number of nodes in the cluster then cluster nodes are recycled. A list of the results is returned; the length of the result list will equal the length of seq.
clusterApply调用fun在第一个聚类节点参数seq[[1]]和...,seq[[2]]和...,等第二个节点上的。 seq如果长度大于在聚类中的节点的数目,然后聚类节点被回收。返回的结果列表结果列表的长度等于的长度seq。

clusterApplyLB is a load balancing version of clusterApply. if the length p of seq is greater than the number of cluster nodes n, then the first n jobs are placed in order on the n nodes.  When the first job completes, the next job is placed on the available node; this continues until all jobs are complete.  Using clusterApplyLB can result in better cluster utilization than using clusterApply.  However, increased communication can reduce performance.  Furthermore, the node that executes a particular job is nondeterministic, which can complicate ensuring reproducibility in simulations.
clusterApplyLB版本的clusterApply是一种负载平衡。如果长度pseq聚类节点的数量是大于n,然后第一个n,工作顺序被放置在上n节点。第一个作业完成后,接下来的工作就是可用的节点上,这种情况持续下去,直到所有的工作都是完整的。使用clusterApplyLB可能会导致更好的聚类利用率比使用clusterApply。然而,加强沟通可能会降低性能。此外,节点执行特定的工作是不确定的,它可以在模拟复杂保证可重复性。

clusterMap is a multi-argument version of clusterApply, analogous to mapply.  If RECYCLE is true shorter arguments are recycled; otherwise, the result length is the length of the shortest argument.  Cluster nodes are recycled if the length of the result is greater than the number of nodes.
clusterMap是一个多参数clusterApply版本的,mapply类似。如果RECYCLE是真正的回收再利用;较短的参数,否则结果的长度是最短的长度参数。 Cluster节点被再循环的结果是,如果长度大于节点的数目。

clusterExport assigns the values on the master of the variables named in list to variables of the same names in the global environments of each node.  The environment on the master from which variables are exported defaults to the global environment.
clusterExport的主人在list命名的变量的变量相同的名称在全球环境中的每个节点上分配的值。在主出口的变量默认为全球环境的环境。

clusterSplit splits seq into one consecutive piece for each cluster and returns the result as a list with length equal to the number of cluster nodes.  Currently the pieces are chosen to be close to equal in length.  Future releases may attempt to use relative performance information about nodes to choose split proportional to performance.
clusterSplit分裂seq成一个连续的一块为每个聚类的聚类节点的数量相等长度的列表的形式返回结果。目前片选择是接近相等长度。未来的版本可能会尝试使用相对节点的性能信息,选择分割成比例的性能。

For more details see http://www.stat.uiowa.edu/~luke/R/cluster/cluster.html.
欲了解更多详细信息,请参阅http://www.stat.uiowa.edu/~:微温/ R /聚类/ cluster.html的。


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


  ## Not run: [#不运行:]
cl <- makeSOCKcluster(c("localhost","localhost"))

clusterApply(cl, 1:2, get("+"), 3)

clusterEvalQ(cl, library(boot))

x<-1
clusterExport(cl, "x")
clusterCall(cl, function(y) x + y, 2)

  
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-8 13:01 , Processed in 0.024516 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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